playbook_ui 14.0.0 → 14.1.0.pre.alpha.fixaction3547
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +5 -2
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +24 -20
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +17 -12
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +86 -1
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +5 -1
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +30 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.jsx +67 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +0 -30
- data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +19 -1
- data/app/pb_kits/playbook/pb_avatar/avatar.rb +44 -1
- data/app/pb_kits/playbook/pb_avatar/avatar.test.js +17 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_description.md +3 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -0
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +3 -0
- data/app/pb_kits/playbook/pb_icon/icon.rb +2 -0
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +2 -1
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.rb +2 -2
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.scss +0 -11
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +3 -2
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.html.erb +1 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.rb +2 -2
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +5 -4
- data/app/pb_kits/playbook/pb_nav/_horizontal_nav.scss +1 -1
- data/app/pb_kits/playbook/pb_online_status/_online_status.scss +52 -5
- data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +6 -1
- data/app/pb_kits/playbook/pb_online_status/docs/_online_status_no_border.html.erb +1 -0
- data/app/pb_kits/playbook/pb_online_status/docs/_online_status_no_border.jsx +14 -0
- data/app/pb_kits/playbook/pb_online_status/docs/_online_status_size.html.erb +3 -0
- data/app/pb_kits/playbook/pb_online_status/docs/_online_status_size.jsx +25 -0
- data/app/pb_kits/playbook/pb_online_status/docs/example.yml +6 -2
- data/app/pb_kits/playbook/pb_online_status/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_online_status/online_status.rb +11 -1
- data/app/pb_kits/playbook/pb_online_status/online_status.test.js +31 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_toggle.html.erb +61 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_toggle.jsx +70 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_toggle.md +1 -0
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +4 -2
- data/app/pb_kits/playbook/pb_overlay/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_star_rating/_star_rating.scss +83 -6
- data/app/pb_kits/playbook/pb_star_rating/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_star_rating/index.js +73 -4
- data/app/pb_kits/playbook/pb_star_rating/star_rating.html.erb +1 -1
- data/app/pb_kits/playbook/pb_star_rating/star_rating.rb +2 -2
- data/app/pb_kits/playbook/pb_star_rating/stars/utils.tsx +5 -1
- data/app/pb_kits/playbook/pb_star_rating/subcomponents/_star_rating_interactive.tsx +50 -21
- data/app/pb_kits/playbook/pb_table/_table.tsx +1 -1
- data/app/pb_kits/playbook/pb_table/index.ts +4 -4
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_body.tsx +1 -1
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_cell.tsx +1 -1
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_head.tsx +1 -1
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_header.tsx +1 -1
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +1 -1
- data/app/pb_kits/playbook/pb_table/table.test.js +2 -0
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +1 -1
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +45 -27
- data/app/pb_kits/playbook/pb_textarea/index.ts +3 -3
- data/app/pb_kits/playbook/pb_time/_time.tsx +3 -3
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +1 -1
- data/app/pb_kits/playbook/pb_timeline/_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +1 -1
- data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +10 -10
- data/app/pb_kits/playbook/pb_toggle/_toggle.tsx +1 -1
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +2 -2
- data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +1 -2
- data/app/pb_kits/playbook/pb_treemap_chart/treemapChart.test.js +2 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +2 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.html.erb +1 -1
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -0
- data/app/pb_kits/playbook/pb_user/_user.tsx +1 -1
- data/app/pb_kits/playbook/pb_user_badge/_user_badge.tsx +6 -6
- data/app/pb_kits/playbook/pb_user_badge/badges/million-dollar.tsx +236 -235
- data/app/pb_kits/playbook/pb_user_badge/badges/veteran.tsx +1 -1
- data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +68 -63
- data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +1 -1
- data/app/pb_kits/playbook/utilities/_positioning.scss +26 -15
- data/dist/chunks/_typeahead-D-4y9pbv.js +22 -0
- data/dist/chunks/_weekday_stacked-D5SswkOC.js +45 -0
- data/dist/chunks/{lib-Bf_E03gc.js → lib-BE0Z3F7x.js} +1 -1
- data/dist/chunks/{pb_form_validation-D0dhqeN2.js → pb_form_validation-TzZQ0Flx.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +2 -2
- metadata +19 -10
- data/app/pb_kits/playbook/pb_online_status/_online_status_mixins.scss +0 -32
- data/dist/chunks/_typeahead-COUJ88EA.js +0 -22
- data/dist/chunks/_weekday_stacked-BAkwel5p.js +0 -45
@@ -0,0 +1,45 @@
|
|
1
|
+
import{r as requireLazysizes}from"./lazysizes-B7xYodB-.js";import{jsx,Fragment,jsxs}from"react/jsx-runtime";import*as React from"react";import React__default,{useEffect,createContext,useContext,useState,useCallback,createElement,useRef,forwardRef,useImperativeHandle,Fragment as Fragment$1,useReducer,useMemo,useLayoutEffect,isValidElement}from"react";import{h as buildAriaProps,i as buildDataProps,j as buildHtmlProps,k as classnames,l as globalProps,m as buildCss,F as Flex,I as Icon,n as FlexItem,o as Body$1,p as Caption,A as Avatar,q as domSafeProps,r as Title,S as SectionSeparator,s as Draggable,t as TextInput,u as PropTypes,v as Card,w as noop$3,x as PbReactPopover,y as CircleIconButton,z as Button,E as Badge,H as joinPresent,J as titleize,K as IconCircle,N as Image,O as Checkbox,Q as Radio}from"./_typeahead-D-4y9pbv.js";import{g as PbTable,D as DateTime$1,a as datePickerHelper,u as useDropdown,o as omitBy,i as isEmpty,m as map,p as partial,j as find$1,n as noop$4,k as colors,h as PbTextarea,l as getDefaultExportFromCjs,q as commonjsGlobal}from"./lib-BE0Z3F7x.js";import*as ReactDOM from"react-dom";import ReactDOM__default,{createPortal}from"react-dom";var ls_attrchange={exports:{}};(function(module){(function(window2,factory){if(!window2){return}var globalInstall=function(){factory(window2.lazySizes);window2.removeEventListener("lazyunveilread",globalInstall,true)};factory=factory.bind(null,window2,window2.document);if(module.exports){factory(requireLazysizes())}else if(window2.lazySizes){globalInstall()}else{window2.addEventListener("lazyunveilread",globalInstall,true)}})(typeof window!="undefined"?window:0,(function(window2,document2,lazySizes){var addObserver=function(){var connect,disconnect,observer,connected;var lsCfg=lazySizes.cfg;var attributes={"data-bgset":1,"data-include":1,"data-poster":1,"data-bg":1,"data-script":1};var regClassTest="(\\s|^)("+lsCfg.loadedClass;var docElem=document2.documentElement;var setClass=function(target){lazySizes.rAF((function(){lazySizes.rC(target,lsCfg.loadedClass);if(lsCfg.unloadedClass){lazySizes.rC(target,lsCfg.unloadedClass)}lazySizes.aC(target,lsCfg.lazyClass);if(target.style.display=="none"||target.parentNode&&target.parentNode.style.display=="none"){setTimeout((function(){lazySizes.loader.unveil(target)}),0)}}))};var onMutation=function(mutations){var i,len,mutation,target;for(i=0,len=mutations.length;i<len;i++){mutation=mutations[i];target=mutation.target;if(!target.getAttribute(mutation.attributeName)){continue}if(target.localName=="source"&&target.parentNode){target=target.parentNode.querySelector("img")}if(target&®ClassTest.test(target.className)){setClass(target)}}};if(lsCfg.unloadedClass){regClassTest+="|"+lsCfg.unloadedClass}regClassTest+="|"+lsCfg.loadingClass+")(\\s|$)";regClassTest=new RegExp(regClassTest);attributes[lsCfg.srcAttr]=1;attributes[lsCfg.srcsetAttr]=1;if(window2.MutationObserver){observer=new MutationObserver(onMutation);connect=function(){if(!connected){connected=true;observer.observe(docElem,{subtree:true,attributes:true,attributeFilter:Object.keys(attributes)})}};disconnect=function(){if(connected){connected=false;observer.disconnect()}}}else{docElem.addEventListener("DOMAttrModified",function(){var runs;var modifications=[];var callMutations=function(){onMutation(modifications);modifications=[];runs=false};return function(e){if(connected&&attributes[e.attrName]&&e.newValue){modifications.push({target:e.target,attributeName:e.attrName});if(!runs){setTimeout(callMutations);runs=true}}}}(),true);connect=function(){connected=true};disconnect=function(){connected=false}}addEventListener("lazybeforeunveil",disconnect,true);addEventListener("lazybeforeunveil",connect);addEventListener("lazybeforesizes",disconnect,true);addEventListener("lazybeforesizes",connect);connect();removeEventListener("lazybeforeunveil",addObserver)};addEventListener("lazybeforeunveil",addObserver)}))})(ls_attrchange);
|
2
|
+
/**
|
3
|
+
* table-core
|
4
|
+
*
|
5
|
+
* Copyright (c) TanStack
|
6
|
+
*
|
7
|
+
* This source code is licensed under the MIT license found in the
|
8
|
+
* LICENSE.md file in the root directory of this source tree.
|
9
|
+
*
|
10
|
+
* @license MIT
|
11
|
+
*/function functionalUpdate(updater,input){return typeof updater==="function"?updater(input):updater}function makeStateUpdater(key,instance){return updater=>{instance.setState((old=>({...old,[key]:functionalUpdate(updater,old[key])})))}}function isFunction$3(d){return d instanceof Function}function isNumberArray(d){return Array.isArray(d)&&d.every((val=>typeof val==="number"))}function flattenBy(arr,getChildren){const flat=[];const recurse=subArr=>{subArr.forEach((item=>{flat.push(item);const children=getChildren(item);if(children!=null&&children.length){recurse(children)}}))};recurse(arr);return flat}function memo(getDeps,fn,opts){let deps=[];let result;return()=>{let depTime;if(opts.key&&opts.debug)depTime=Date.now();const newDeps=getDeps();const depsChanged=newDeps.length!==deps.length||newDeps.some(((dep,index)=>deps[index]!==dep));if(!depsChanged){return result}deps=newDeps;let resultTime;if(opts.key&&opts.debug)resultTime=Date.now();result=fn(...newDeps);opts==null?void 0:opts.onChange==null?void 0:opts.onChange(result);if(opts.key&&opts.debug){if(opts!=null&&opts.debug()){const depEndTime=Math.round((Date.now()-depTime)*100)/100;const resultEndTime=Math.round((Date.now()-resultTime)*100)/100;const resultFpsPercentage=resultEndTime/16;const pad=(str,num)=>{str=String(str);while(str.length<num){str=" "+str}return str};console.info(`%c⏱ ${pad(resultEndTime,5)} /${pad(depEndTime,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*resultFpsPercentage,120))}deg 100% 31%);`,opts==null?void 0:opts.key)}}return result}}function createColumn(table,columnDef,depth,parent){var _ref,_resolvedColumnDef$id;const defaultColumn=table._getDefaultColumnDef();const resolvedColumnDef={...defaultColumn,...columnDef};const accessorKey=resolvedColumnDef.accessorKey;let id=(_ref=(_resolvedColumnDef$id=resolvedColumnDef.id)!=null?_resolvedColumnDef$id:accessorKey?accessorKey.replace(".","_"):void 0)!=null?_ref:typeof resolvedColumnDef.header==="string"?resolvedColumnDef.header:void 0;let accessorFn;if(resolvedColumnDef.accessorFn){accessorFn=resolvedColumnDef.accessorFn}else if(accessorKey){if(accessorKey.includes(".")){accessorFn=originalRow=>{let result=originalRow;for(const key of accessorKey.split(".")){var _result;result=(_result=result)==null?void 0:_result[key]}return result}}else{accessorFn=originalRow=>originalRow[resolvedColumnDef.accessorKey]}}if(!id){throw new Error}let column={id:`${String(id)}`,accessorFn:accessorFn,parent:parent,depth:depth,columnDef:resolvedColumnDef,columns:[],getFlatColumns:memo((()=>[true]),(()=>{var _column$columns;return[column,...(_column$columns=column.columns)==null?void 0:_column$columns.flatMap((d=>d.getFlatColumns()))]}),{key:"column.getFlatColumns",debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugColumns}}),getLeafColumns:memo((()=>[table._getOrderColumnsFn()]),(orderColumns2=>{var _column$columns2;if((_column$columns2=column.columns)!=null&&_column$columns2.length){let leafColumns=column.columns.flatMap((column2=>column2.getLeafColumns()));return orderColumns2(leafColumns)}return[column]}),{key:"column.getLeafColumns",debug:()=>{var _table$options$debugA2;return(_table$options$debugA2=table.options.debugAll)!=null?_table$options$debugA2:table.options.debugColumns}})};column=table._features.reduce(((obj,feature)=>Object.assign(obj,feature.createColumn==null?void 0:feature.createColumn(column,table))),column);return column}function createHeader(table,column,options){var _options$id;const id=(_options$id=options.id)!=null?_options$id:column.id;let header={id:id,column:column,index:options.index,isPlaceholder:!!options.isPlaceholder,placeholderId:options.placeholderId,depth:options.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const leafHeaders=[];const recurseHeader=h=>{if(h.subHeaders&&h.subHeaders.length){h.subHeaders.map(recurseHeader)}leafHeaders.push(h)};recurseHeader(header);return leafHeaders},getContext:()=>({table:table,header:header,column:column})};table._features.forEach((feature=>{Object.assign(header,feature.createHeader==null?void 0:feature.createHeader(header,table))}));return header}const Headers={createTable:table=>({getHeaderGroups:memo((()=>[table.getAllColumns(),table.getVisibleLeafColumns(),table.getState().columnPinning.left,table.getState().columnPinning.right]),((allColumns,leafColumns,left,right)=>{var _left$map$filter,_right$map$filter;const leftColumns=(_left$map$filter=left==null?void 0:left.map((columnId=>leafColumns.find((d=>d.id===columnId)))).filter(Boolean))!=null?_left$map$filter:[];const rightColumns=(_right$map$filter=right==null?void 0:right.map((columnId=>leafColumns.find((d=>d.id===columnId)))).filter(Boolean))!=null?_right$map$filter:[];const centerColumns=leafColumns.filter((column=>!(left!=null&&left.includes(column.id))&&!(right!=null&&right.includes(column.id))));const headerGroups=buildHeaderGroups(allColumns,[...leftColumns,...centerColumns,...rightColumns],table);return headerGroups}),{key:false,debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugHeaders}}),getCenterHeaderGroups:memo((()=>[table.getAllColumns(),table.getVisibleLeafColumns(),table.getState().columnPinning.left,table.getState().columnPinning.right]),((allColumns,leafColumns,left,right)=>{leafColumns=leafColumns.filter((column=>!(left!=null&&left.includes(column.id))&&!(right!=null&&right.includes(column.id))));return buildHeaderGroups(allColumns,leafColumns,table,"center")}),{key:false,debug:()=>{var _table$options$debugA2;return(_table$options$debugA2=table.options.debugAll)!=null?_table$options$debugA2:table.options.debugHeaders}}),getLeftHeaderGroups:memo((()=>[table.getAllColumns(),table.getVisibleLeafColumns(),table.getState().columnPinning.left]),((allColumns,leafColumns,left)=>{var _left$map$filter2;const orderedLeafColumns=(_left$map$filter2=left==null?void 0:left.map((columnId=>leafColumns.find((d=>d.id===columnId)))).filter(Boolean))!=null?_left$map$filter2:[];return buildHeaderGroups(allColumns,orderedLeafColumns,table,"left")}),{key:false,debug:()=>{var _table$options$debugA3;return(_table$options$debugA3=table.options.debugAll)!=null?_table$options$debugA3:table.options.debugHeaders}}),getRightHeaderGroups:memo((()=>[table.getAllColumns(),table.getVisibleLeafColumns(),table.getState().columnPinning.right]),((allColumns,leafColumns,right)=>{var _right$map$filter2;const orderedLeafColumns=(_right$map$filter2=right==null?void 0:right.map((columnId=>leafColumns.find((d=>d.id===columnId)))).filter(Boolean))!=null?_right$map$filter2:[];return buildHeaderGroups(allColumns,orderedLeafColumns,table,"right")}),{key:false,debug:()=>{var _table$options$debugA4;return(_table$options$debugA4=table.options.debugAll)!=null?_table$options$debugA4:table.options.debugHeaders}}),getFooterGroups:memo((()=>[table.getHeaderGroups()]),(headerGroups=>[...headerGroups].reverse()),{key:false,debug:()=>{var _table$options$debugA5;return(_table$options$debugA5=table.options.debugAll)!=null?_table$options$debugA5:table.options.debugHeaders}}),getLeftFooterGroups:memo((()=>[table.getLeftHeaderGroups()]),(headerGroups=>[...headerGroups].reverse()),{key:false,debug:()=>{var _table$options$debugA6;return(_table$options$debugA6=table.options.debugAll)!=null?_table$options$debugA6:table.options.debugHeaders}}),getCenterFooterGroups:memo((()=>[table.getCenterHeaderGroups()]),(headerGroups=>[...headerGroups].reverse()),{key:false,debug:()=>{var _table$options$debugA7;return(_table$options$debugA7=table.options.debugAll)!=null?_table$options$debugA7:table.options.debugHeaders}}),getRightFooterGroups:memo((()=>[table.getRightHeaderGroups()]),(headerGroups=>[...headerGroups].reverse()),{key:false,debug:()=>{var _table$options$debugA8;return(_table$options$debugA8=table.options.debugAll)!=null?_table$options$debugA8:table.options.debugHeaders}}),getFlatHeaders:memo((()=>[table.getHeaderGroups()]),(headerGroups=>headerGroups.map((headerGroup=>headerGroup.headers)).flat()),{key:false,debug:()=>{var _table$options$debugA9;return(_table$options$debugA9=table.options.debugAll)!=null?_table$options$debugA9:table.options.debugHeaders}}),getLeftFlatHeaders:memo((()=>[table.getLeftHeaderGroups()]),(left=>left.map((headerGroup=>headerGroup.headers)).flat()),{key:false,debug:()=>{var _table$options$debugA10;return(_table$options$debugA10=table.options.debugAll)!=null?_table$options$debugA10:table.options.debugHeaders}}),getCenterFlatHeaders:memo((()=>[table.getCenterHeaderGroups()]),(left=>left.map((headerGroup=>headerGroup.headers)).flat()),{key:false,debug:()=>{var _table$options$debugA11;return(_table$options$debugA11=table.options.debugAll)!=null?_table$options$debugA11:table.options.debugHeaders}}),getRightFlatHeaders:memo((()=>[table.getRightHeaderGroups()]),(left=>left.map((headerGroup=>headerGroup.headers)).flat()),{key:false,debug:()=>{var _table$options$debugA12;return(_table$options$debugA12=table.options.debugAll)!=null?_table$options$debugA12:table.options.debugHeaders}}),getCenterLeafHeaders:memo((()=>[table.getCenterFlatHeaders()]),(flatHeaders=>flatHeaders.filter((header=>{var _header$subHeaders;return!((_header$subHeaders=header.subHeaders)!=null&&_header$subHeaders.length)}))),{key:false,debug:()=>{var _table$options$debugA13;return(_table$options$debugA13=table.options.debugAll)!=null?_table$options$debugA13:table.options.debugHeaders}}),getLeftLeafHeaders:memo((()=>[table.getLeftFlatHeaders()]),(flatHeaders=>flatHeaders.filter((header=>{var _header$subHeaders2;return!((_header$subHeaders2=header.subHeaders)!=null&&_header$subHeaders2.length)}))),{key:false,debug:()=>{var _table$options$debugA14;return(_table$options$debugA14=table.options.debugAll)!=null?_table$options$debugA14:table.options.debugHeaders}}),getRightLeafHeaders:memo((()=>[table.getRightFlatHeaders()]),(flatHeaders=>flatHeaders.filter((header=>{var _header$subHeaders3;return!((_header$subHeaders3=header.subHeaders)!=null&&_header$subHeaders3.length)}))),{key:false,debug:()=>{var _table$options$debugA15;return(_table$options$debugA15=table.options.debugAll)!=null?_table$options$debugA15:table.options.debugHeaders}}),getLeafHeaders:memo((()=>[table.getLeftHeaderGroups(),table.getCenterHeaderGroups(),table.getRightHeaderGroups()]),((left,center,right)=>{var _left$0$headers,_left$,_center$0$headers,_center$,_right$0$headers,_right$;return[...(_left$0$headers=(_left$=left[0])==null?void 0:_left$.headers)!=null?_left$0$headers:[],...(_center$0$headers=(_center$=center[0])==null?void 0:_center$.headers)!=null?_center$0$headers:[],...(_right$0$headers=(_right$=right[0])==null?void 0:_right$.headers)!=null?_right$0$headers:[]].map((header=>header.getLeafHeaders())).flat()}),{key:false,debug:()=>{var _table$options$debugA16;return(_table$options$debugA16=table.options.debugAll)!=null?_table$options$debugA16:table.options.debugHeaders}})})};function buildHeaderGroups(allColumns,columnsToGroup,table,headerFamily){var _headerGroups$0$heade,_headerGroups$;let maxDepth=0;const findMaxDepth=function(columns,depth){if(depth===void 0){depth=1}maxDepth=Math.max(maxDepth,depth);columns.filter((column=>column.getIsVisible())).forEach((column=>{var _column$columns;if((_column$columns=column.columns)!=null&&_column$columns.length){findMaxDepth(column.columns,depth+1)}}),0)};findMaxDepth(allColumns);let headerGroups=[];const createHeaderGroup=(headersToGroup,depth)=>{const headerGroup={depth:depth,id:[headerFamily,`${depth}`].filter(Boolean).join("_"),headers:[]};const pendingParentHeaders=[];headersToGroup.forEach((headerToGroup=>{const latestPendingParentHeader=[...pendingParentHeaders].reverse()[0];const isLeafHeader=headerToGroup.column.depth===headerGroup.depth;let column;let isPlaceholder=false;if(isLeafHeader&&headerToGroup.column.parent){column=headerToGroup.column.parent}else{column=headerToGroup.column;isPlaceholder=true}if(latestPendingParentHeader&&(latestPendingParentHeader==null?void 0:latestPendingParentHeader.column)===column){latestPendingParentHeader.subHeaders.push(headerToGroup)}else{const header=createHeader(table,column,{id:[headerFamily,depth,column.id,headerToGroup==null?void 0:headerToGroup.id].filter(Boolean).join("_"),isPlaceholder:isPlaceholder,placeholderId:isPlaceholder?`${pendingParentHeaders.filter((d=>d.column===column)).length}`:void 0,depth:depth,index:pendingParentHeaders.length});header.subHeaders.push(headerToGroup);pendingParentHeaders.push(header)}headerGroup.headers.push(headerToGroup);headerToGroup.headerGroup=headerGroup}));headerGroups.push(headerGroup);if(depth>0){createHeaderGroup(pendingParentHeaders,depth-1)}};const bottomHeaders=columnsToGroup.map(((column,index)=>createHeader(table,column,{depth:maxDepth,index:index})));createHeaderGroup(bottomHeaders,maxDepth-1);headerGroups.reverse();const recurseHeadersForSpans=headers=>{const filteredHeaders=headers.filter((header=>header.column.getIsVisible()));return filteredHeaders.map((header=>{let colSpan=0;let rowSpan=0;let childRowSpans=[0];if(header.subHeaders&&header.subHeaders.length){childRowSpans=[];recurseHeadersForSpans(header.subHeaders).forEach((_ref=>{let{colSpan:childColSpan,rowSpan:childRowSpan}=_ref;colSpan+=childColSpan;childRowSpans.push(childRowSpan)}))}else{colSpan=1}const minChildRowSpan=Math.min(...childRowSpans);rowSpan=rowSpan+minChildRowSpan;header.colSpan=colSpan;header.rowSpan=rowSpan;return{colSpan:colSpan,rowSpan:rowSpan}}))};recurseHeadersForSpans((_headerGroups$0$heade=(_headerGroups$=headerGroups[0])==null?void 0:_headerGroups$.headers)!=null?_headerGroups$0$heade:[]);return headerGroups}const defaultColumnSizing={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER};const getDefaultColumnSizingInfoState=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:false,columnSizingStart:[]});const ColumnSizing={getDefaultColumnDef:()=>defaultColumnSizing,getInitialState:state=>({columnSizing:{},columnSizingInfo:getDefaultColumnSizingInfoState(),...state}),getDefaultOptions:table=>({columnResizeMode:"onEnd",onColumnSizingChange:makeStateUpdater("columnSizing",table),onColumnSizingInfoChange:makeStateUpdater("columnSizingInfo",table)}),createColumn:(column,table)=>({getSize:()=>{var _column$columnDef$min,_ref,_column$columnDef$max;const columnSize=table.getState().columnSizing[column.id];return Math.min(Math.max((_column$columnDef$min=column.columnDef.minSize)!=null?_column$columnDef$min:defaultColumnSizing.minSize,(_ref=columnSize!=null?columnSize:column.columnDef.size)!=null?_ref:defaultColumnSizing.size),(_column$columnDef$max=column.columnDef.maxSize)!=null?_column$columnDef$max:defaultColumnSizing.maxSize)},getStart:position=>{const columns=!position?table.getVisibleLeafColumns():position==="left"?table.getLeftVisibleLeafColumns():table.getRightVisibleLeafColumns();const index=columns.findIndex((d=>d.id===column.id));if(index>0){const prevSiblingColumn=columns[index-1];return prevSiblingColumn.getStart(position)+prevSiblingColumn.getSize()}return 0},resetSize:()=>{table.setColumnSizing((_ref2=>{let{[column.id]:_,...rest}=_ref2;return rest}))},getCanResize:()=>{var _column$columnDef$ena,_table$options$enable;return((_column$columnDef$ena=column.columnDef.enableResizing)!=null?_column$columnDef$ena:true)&&((_table$options$enable=table.options.enableColumnResizing)!=null?_table$options$enable:true)},getIsResizing:()=>table.getState().columnSizingInfo.isResizingColumn===column.id}),createHeader:(header,table)=>({getSize:()=>{let sum2=0;const recurse=header2=>{if(header2.subHeaders.length){header2.subHeaders.forEach(recurse)}else{var _header$column$getSiz;sum2+=(_header$column$getSiz=header2.column.getSize())!=null?_header$column$getSiz:0}};recurse(header);return sum2},getStart:()=>{if(header.index>0){const prevSiblingHeader=header.headerGroup.headers[header.index-1];return prevSiblingHeader.getStart()+prevSiblingHeader.getSize()}return 0},getResizeHandler:()=>{const column=table.getColumn(header.column.id);const canResize=column==null?void 0:column.getCanResize();return e=>{if(!column||!canResize){return}e.persist==null?void 0:e.persist();if(isTouchStartEvent(e)){if(e.touches&&e.touches.length>1){return}}const startSize=header.getSize();const columnSizingStart=header?header.getLeafHeaders().map((d=>[d.column.id,d.column.getSize()])):[[column.id,column.getSize()]];const clientX=isTouchStartEvent(e)?Math.round(e.touches[0].clientX):e.clientX;const newColumnSizing={};const updateOffset=(eventType,clientXPos)=>{if(typeof clientXPos!=="number"){return}table.setColumnSizingInfo((old=>{var _old$startOffset,_old$startSize;const deltaOffset=clientXPos-((_old$startOffset=old==null?void 0:old.startOffset)!=null?_old$startOffset:0);const deltaPercentage=Math.max(deltaOffset/((_old$startSize=old==null?void 0:old.startSize)!=null?_old$startSize:0),-.999999);old.columnSizingStart.forEach((_ref3=>{let[columnId,headerSize]=_ref3;newColumnSizing[columnId]=Math.round(Math.max(headerSize+headerSize*deltaPercentage,0)*100)/100}));return{...old,deltaOffset:deltaOffset,deltaPercentage:deltaPercentage}}));if(table.options.columnResizeMode==="onChange"||eventType==="end"){table.setColumnSizing((old=>({...old,...newColumnSizing})))}};const onMove=clientXPos=>updateOffset("move",clientXPos);const onEnd=clientXPos=>{updateOffset("end",clientXPos);table.setColumnSizingInfo((old=>({...old,isResizingColumn:false,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))};const mouseEvents={moveHandler:e2=>onMove(e2.clientX),upHandler:e2=>{document.removeEventListener("mousemove",mouseEvents.moveHandler);document.removeEventListener("mouseup",mouseEvents.upHandler);onEnd(e2.clientX)}};const touchEvents={moveHandler:e2=>{if(e2.cancelable){e2.preventDefault();e2.stopPropagation()}onMove(e2.touches[0].clientX);return false},upHandler:e2=>{var _e$touches$;document.removeEventListener("touchmove",touchEvents.moveHandler);document.removeEventListener("touchend",touchEvents.upHandler);if(e2.cancelable){e2.preventDefault();e2.stopPropagation()}onEnd((_e$touches$=e2.touches[0])==null?void 0:_e$touches$.clientX)}};const passiveIfSupported=passiveEventSupported()?{passive:false}:false;if(isTouchStartEvent(e)){document.addEventListener("touchmove",touchEvents.moveHandler,passiveIfSupported);document.addEventListener("touchend",touchEvents.upHandler,passiveIfSupported)}else{document.addEventListener("mousemove",mouseEvents.moveHandler,passiveIfSupported);document.addEventListener("mouseup",mouseEvents.upHandler,passiveIfSupported)}table.setColumnSizingInfo((old=>({...old,startOffset:clientX,startSize:startSize,deltaOffset:0,deltaPercentage:0,columnSizingStart:columnSizingStart,isResizingColumn:column.id})))}}}),createTable:table=>({setColumnSizing:updater=>table.options.onColumnSizingChange==null?void 0:table.options.onColumnSizingChange(updater),setColumnSizingInfo:updater=>table.options.onColumnSizingInfoChange==null?void 0:table.options.onColumnSizingInfoChange(updater),resetColumnSizing:defaultState2=>{var _table$initialState$c;table.setColumnSizing(defaultState2?{}:(_table$initialState$c=table.initialState.columnSizing)!=null?_table$initialState$c:{})},resetHeaderSizeInfo:defaultState2=>{var _table$initialState$c2;table.setColumnSizingInfo(defaultState2?getDefaultColumnSizingInfoState():(_table$initialState$c2=table.initialState.columnSizingInfo)!=null?_table$initialState$c2:getDefaultColumnSizingInfoState())},getTotalSize:()=>{var _table$getHeaderGroup,_table$getHeaderGroup2;return(_table$getHeaderGroup=(_table$getHeaderGroup2=table.getHeaderGroups()[0])==null?void 0:_table$getHeaderGroup2.headers.reduce(((sum2,header)=>sum2+header.getSize()),0))!=null?_table$getHeaderGroup:0},getLeftTotalSize:()=>{var _table$getLeftHeaderG,_table$getLeftHeaderG2;return(_table$getLeftHeaderG=(_table$getLeftHeaderG2=table.getLeftHeaderGroups()[0])==null?void 0:_table$getLeftHeaderG2.headers.reduce(((sum2,header)=>sum2+header.getSize()),0))!=null?_table$getLeftHeaderG:0},getCenterTotalSize:()=>{var _table$getCenterHeade,_table$getCenterHeade2;return(_table$getCenterHeade=(_table$getCenterHeade2=table.getCenterHeaderGroups()[0])==null?void 0:_table$getCenterHeade2.headers.reduce(((sum2,header)=>sum2+header.getSize()),0))!=null?_table$getCenterHeade:0},getRightTotalSize:()=>{var _table$getRightHeader,_table$getRightHeader2;return(_table$getRightHeader=(_table$getRightHeader2=table.getRightHeaderGroups()[0])==null?void 0:_table$getRightHeader2.headers.reduce(((sum2,header)=>sum2+header.getSize()),0))!=null?_table$getRightHeader:0}})};let passiveSupported$1=null;function passiveEventSupported(){if(typeof passiveSupported$1==="boolean")return passiveSupported$1;let supported=false;try{const options={get passive(){supported=true;return false}};const noop2=()=>{};window.addEventListener("test",noop2,options);window.removeEventListener("test",noop2)}catch(err){supported=false}passiveSupported$1=supported;return passiveSupported$1}function isTouchStartEvent(e){return e.type==="touchstart"}const Expanding={getInitialState:state=>({expanded:{},...state}),getDefaultOptions:table=>({onExpandedChange:makeStateUpdater("expanded",table),paginateExpandedRows:true}),createTable:table=>{let registered=false;let queued=false;return{_autoResetExpanded:()=>{var _ref,_table$options$autoRe;if(!registered){table._queue((()=>{registered=true}));return}if((_ref=(_table$options$autoRe=table.options.autoResetAll)!=null?_table$options$autoRe:table.options.autoResetExpanded)!=null?_ref:!table.options.manualExpanding){if(queued)return;queued=true;table._queue((()=>{table.resetExpanded();queued=false}))}},setExpanded:updater=>table.options.onExpandedChange==null?void 0:table.options.onExpandedChange(updater),toggleAllRowsExpanded:expanded=>{if(expanded!=null?expanded:!table.getIsAllRowsExpanded()){table.setExpanded(true)}else{table.setExpanded({})}},resetExpanded:defaultState2=>{var _table$initialState$e,_table$initialState;table.setExpanded(defaultState2?{}:(_table$initialState$e=(_table$initialState=table.initialState)==null?void 0:_table$initialState.expanded)!=null?_table$initialState$e:{})},getCanSomeRowsExpand:()=>table.getPrePaginationRowModel().flatRows.some((row=>row.getCanExpand())),getToggleAllRowsExpandedHandler:()=>e=>{e.persist==null?void 0:e.persist();table.toggleAllRowsExpanded()},getIsSomeRowsExpanded:()=>{const expanded=table.getState().expanded;return expanded===true||Object.values(expanded).some(Boolean)},getIsAllRowsExpanded:()=>{const expanded=table.getState().expanded;if(typeof expanded==="boolean"){return expanded===true}if(!Object.keys(expanded).length){return false}if(table.getRowModel().flatRows.some((row=>!row.getIsExpanded()))){return false}return true},getExpandedDepth:()=>{let maxDepth=0;const rowIds=table.getState().expanded===true?Object.keys(table.getRowModel().rowsById):Object.keys(table.getState().expanded);rowIds.forEach((id=>{const splitId=id.split(".");maxDepth=Math.max(maxDepth,splitId.length)}));return maxDepth},getPreExpandedRowModel:()=>table.getSortedRowModel(),getExpandedRowModel:()=>{if(!table._getExpandedRowModel&&table.options.getExpandedRowModel){table._getExpandedRowModel=table.options.getExpandedRowModel(table)}if(table.options.manualExpanding||!table._getExpandedRowModel){return table.getPreExpandedRowModel()}return table._getExpandedRowModel()}}},createRow:(row,table)=>({toggleExpanded:expanded=>{table.setExpanded((old=>{var _expanded;const exists=old===true?true:!!(old!=null&&old[row.id]);let oldExpanded={};if(old===true){Object.keys(table.getRowModel().rowsById).forEach((rowId=>{oldExpanded[rowId]=true}))}else{oldExpanded=old}expanded=(_expanded=expanded)!=null?_expanded:!exists;if(!exists&&expanded){return{...oldExpanded,[row.id]:true}}if(exists&&!expanded){const{[row.id]:_,...rest}=oldExpanded;return rest}return old}))},getIsExpanded:()=>{var _table$options$getIsR;const expanded=table.getState().expanded;return!!((_table$options$getIsR=table.options.getIsRowExpanded==null?void 0:table.options.getIsRowExpanded(row))!=null?_table$options$getIsR:expanded===true||(expanded==null?void 0:expanded[row.id]))},getCanExpand:()=>{var _table$options$getRow,_table$options$enable,_row$subRows;return(_table$options$getRow=table.options.getRowCanExpand==null?void 0:table.options.getRowCanExpand(row))!=null?_table$options$getRow:((_table$options$enable=table.options.enableExpanding)!=null?_table$options$enable:true)&&!!((_row$subRows=row.subRows)!=null&&_row$subRows.length)},getToggleExpandedHandler:()=>{const canExpand=row.getCanExpand();return()=>{if(!canExpand)return;row.toggleExpanded()}}})};const includesString=(row,columnId,filterValue)=>{var _row$getValue,_row$getValue$toStrin,_row$getValue$toStrin2;const search=filterValue.toLowerCase();return Boolean((_row$getValue=row.getValue(columnId))==null?void 0:(_row$getValue$toStrin=_row$getValue.toString())==null?void 0:(_row$getValue$toStrin2=_row$getValue$toStrin.toLowerCase())==null?void 0:_row$getValue$toStrin2.includes(search))};includesString.autoRemove=val=>testFalsey(val);const includesStringSensitive=(row,columnId,filterValue)=>{var _row$getValue2,_row$getValue2$toStri;return Boolean((_row$getValue2=row.getValue(columnId))==null?void 0:(_row$getValue2$toStri=_row$getValue2.toString())==null?void 0:_row$getValue2$toStri.includes(filterValue))};includesStringSensitive.autoRemove=val=>testFalsey(val);const equalsString=(row,columnId,filterValue)=>{var _row$getValue3,_row$getValue3$toStri;return((_row$getValue3=row.getValue(columnId))==null?void 0:(_row$getValue3$toStri=_row$getValue3.toString())==null?void 0:_row$getValue3$toStri.toLowerCase())===(filterValue==null?void 0:filterValue.toLowerCase())};equalsString.autoRemove=val=>testFalsey(val);const arrIncludes=(row,columnId,filterValue)=>{var _row$getValue4;return(_row$getValue4=row.getValue(columnId))==null?void 0:_row$getValue4.includes(filterValue)};arrIncludes.autoRemove=val=>testFalsey(val)||!(val!=null&&val.length);const arrIncludesAll=(row,columnId,filterValue)=>!filterValue.some((val=>{var _row$getValue5;return!((_row$getValue5=row.getValue(columnId))!=null&&_row$getValue5.includes(val))}));arrIncludesAll.autoRemove=val=>testFalsey(val)||!(val!=null&&val.length);const arrIncludesSome=(row,columnId,filterValue)=>filterValue.some((val=>{var _row$getValue6;return(_row$getValue6=row.getValue(columnId))==null?void 0:_row$getValue6.includes(val)}));arrIncludesSome.autoRemove=val=>testFalsey(val)||!(val!=null&&val.length);const equals=(row,columnId,filterValue)=>row.getValue(columnId)===filterValue;equals.autoRemove=val=>testFalsey(val);const weakEquals=(row,columnId,filterValue)=>row.getValue(columnId)==filterValue;weakEquals.autoRemove=val=>testFalsey(val);const inNumberRange=(row,columnId,filterValue)=>{let[min2,max2]=filterValue;const rowValue=row.getValue(columnId);return rowValue>=min2&&rowValue<=max2};inNumberRange.resolveFilterValue=val=>{let[unsafeMin,unsafeMax]=val;let parsedMin=typeof unsafeMin!=="number"?parseFloat(unsafeMin):unsafeMin;let parsedMax=typeof unsafeMax!=="number"?parseFloat(unsafeMax):unsafeMax;let min2=unsafeMin===null||Number.isNaN(parsedMin)?-Infinity:parsedMin;let max2=unsafeMax===null||Number.isNaN(parsedMax)?Infinity:parsedMax;if(min2>max2){const temp=min2;min2=max2;max2=temp}return[min2,max2]};inNumberRange.autoRemove=val=>testFalsey(val)||testFalsey(val[0])&&testFalsey(val[1]);const filterFns={includesString:includesString,includesStringSensitive:includesStringSensitive,equalsString:equalsString,arrIncludes:arrIncludes,arrIncludesAll:arrIncludesAll,arrIncludesSome:arrIncludesSome,equals:equals,weakEquals:weakEquals,inNumberRange:inNumberRange};function testFalsey(val){return val===void 0||val===null||val===""}const Filters={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:state=>({columnFilters:[],globalFilter:void 0,...state}),getDefaultOptions:table=>({onColumnFiltersChange:makeStateUpdater("columnFilters",table),onGlobalFilterChange:makeStateUpdater("globalFilter",table),filterFromLeafRows:false,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:column=>{var _table$getCoreRowMode,_table$getCoreRowMode2;const value=(_table$getCoreRowMode=table.getCoreRowModel().flatRows[0])==null?void 0:(_table$getCoreRowMode2=_table$getCoreRowMode._getAllCellsByColumnId()[column.id])==null?void 0:_table$getCoreRowMode2.getValue();return typeof value==="string"||typeof value==="number"}}),createColumn:(column,table)=>({getAutoFilterFn:()=>{const firstRow=table.getCoreRowModel().flatRows[0];const value=firstRow==null?void 0:firstRow.getValue(column.id);if(typeof value==="string"){return filterFns.includesString}if(typeof value==="number"){return filterFns.inNumberRange}if(typeof value==="boolean"){return filterFns.equals}if(value!==null&&typeof value==="object"){return filterFns.equals}if(Array.isArray(value)){return filterFns.arrIncludes}return filterFns.weakEquals},getFilterFn:()=>{var _table$options$filter,_table$options$filter2;return isFunction$3(column.columnDef.filterFn)?column.columnDef.filterFn:column.columnDef.filterFn==="auto"?column.getAutoFilterFn():(_table$options$filter=(_table$options$filter2=table.options.filterFns)==null?void 0:_table$options$filter2[column.columnDef.filterFn])!=null?_table$options$filter:filterFns[column.columnDef.filterFn]},getCanFilter:()=>{var _column$columnDef$ena,_table$options$enable,_table$options$enable2;return((_column$columnDef$ena=column.columnDef.enableColumnFilter)!=null?_column$columnDef$ena:true)&&((_table$options$enable=table.options.enableColumnFilters)!=null?_table$options$enable:true)&&((_table$options$enable2=table.options.enableFilters)!=null?_table$options$enable2:true)&&!!column.accessorFn},getCanGlobalFilter:()=>{var _column$columnDef$ena2,_table$options$enable3,_table$options$enable4,_table$options$getCol;return((_column$columnDef$ena2=column.columnDef.enableGlobalFilter)!=null?_column$columnDef$ena2:true)&&((_table$options$enable3=table.options.enableGlobalFilter)!=null?_table$options$enable3:true)&&((_table$options$enable4=table.options.enableFilters)!=null?_table$options$enable4:true)&&((_table$options$getCol=table.options.getColumnCanGlobalFilter==null?void 0:table.options.getColumnCanGlobalFilter(column))!=null?_table$options$getCol:true)&&!!column.accessorFn},getIsFiltered:()=>column.getFilterIndex()>-1,getFilterValue:()=>{var _table$getState$colum,_table$getState$colum2;return(_table$getState$colum=table.getState().columnFilters)==null?void 0:(_table$getState$colum2=_table$getState$colum.find((d=>d.id===column.id)))==null?void 0:_table$getState$colum2.value},getFilterIndex:()=>{var _table$getState$colum3,_table$getState$colum4;return(_table$getState$colum3=(_table$getState$colum4=table.getState().columnFilters)==null?void 0:_table$getState$colum4.findIndex((d=>d.id===column.id)))!=null?_table$getState$colum3:-1},setFilterValue:value=>{table.setColumnFilters((old=>{const filterFn=column.getFilterFn();const previousfilter=old==null?void 0:old.find((d=>d.id===column.id));const newFilter=functionalUpdate(value,previousfilter?previousfilter.value:void 0);if(shouldAutoRemoveFilter(filterFn,newFilter,column)){var _old$filter;return(_old$filter=old==null?void 0:old.filter((d=>d.id!==column.id)))!=null?_old$filter:[]}const newFilterObj={id:column.id,value:newFilter};if(previousfilter){var _old$map;return(_old$map=old==null?void 0:old.map((d=>{if(d.id===column.id){return newFilterObj}return d})))!=null?_old$map:[]}if(old!=null&&old.length){return[...old,newFilterObj]}return[newFilterObj]}))},_getFacetedRowModel:table.options.getFacetedRowModel&&table.options.getFacetedRowModel(table,column.id),getFacetedRowModel:()=>{if(!column._getFacetedRowModel){return table.getPreFilteredRowModel()}return column._getFacetedRowModel()},_getFacetedUniqueValues:table.options.getFacetedUniqueValues&&table.options.getFacetedUniqueValues(table,column.id),getFacetedUniqueValues:()=>{if(!column._getFacetedUniqueValues){return new Map}return column._getFacetedUniqueValues()},_getFacetedMinMaxValues:table.options.getFacetedMinMaxValues&&table.options.getFacetedMinMaxValues(table,column.id),getFacetedMinMaxValues:()=>{if(!column._getFacetedMinMaxValues){return void 0}return column._getFacetedMinMaxValues()}}),createRow:(row,table)=>({columnFilters:{},columnFiltersMeta:{}}),createTable:table=>({getGlobalAutoFilterFn:()=>filterFns.includesString,getGlobalFilterFn:()=>{var _table$options$filter3,_table$options$filter4;const{globalFilterFn:globalFilterFn}=table.options;return isFunction$3(globalFilterFn)?globalFilterFn:globalFilterFn==="auto"?table.getGlobalAutoFilterFn():(_table$options$filter3=(_table$options$filter4=table.options.filterFns)==null?void 0:_table$options$filter4[globalFilterFn])!=null?_table$options$filter3:filterFns[globalFilterFn]},setColumnFilters:updater=>{const leafColumns=table.getAllLeafColumns();const updateFn=old=>{var _functionalUpdate;return(_functionalUpdate=functionalUpdate(updater,old))==null?void 0:_functionalUpdate.filter((filter=>{const column=leafColumns.find((d=>d.id===filter.id));if(column){const filterFn=column.getFilterFn();if(shouldAutoRemoveFilter(filterFn,filter.value,column)){return false}}return true}))};table.options.onColumnFiltersChange==null?void 0:table.options.onColumnFiltersChange(updateFn)},setGlobalFilter:updater=>{table.options.onGlobalFilterChange==null?void 0:table.options.onGlobalFilterChange(updater)},resetGlobalFilter:defaultState2=>{table.setGlobalFilter(defaultState2?void 0:table.initialState.globalFilter)},resetColumnFilters:defaultState2=>{var _table$initialState$c,_table$initialState;table.setColumnFilters(defaultState2?[]:(_table$initialState$c=(_table$initialState=table.initialState)==null?void 0:_table$initialState.columnFilters)!=null?_table$initialState$c:[])},getPreFilteredRowModel:()=>table.getCoreRowModel(),getFilteredRowModel:()=>{if(!table._getFilteredRowModel&&table.options.getFilteredRowModel){table._getFilteredRowModel=table.options.getFilteredRowModel(table)}if(table.options.manualFiltering||!table._getFilteredRowModel){return table.getPreFilteredRowModel()}return table._getFilteredRowModel()},_getGlobalFacetedRowModel:table.options.getFacetedRowModel&&table.options.getFacetedRowModel(table,"__global__"),getGlobalFacetedRowModel:()=>{if(table.options.manualFiltering||!table._getGlobalFacetedRowModel){return table.getPreFilteredRowModel()}return table._getGlobalFacetedRowModel()},_getGlobalFacetedUniqueValues:table.options.getFacetedUniqueValues&&table.options.getFacetedUniqueValues(table,"__global__"),getGlobalFacetedUniqueValues:()=>{if(!table._getGlobalFacetedUniqueValues){return new Map}return table._getGlobalFacetedUniqueValues()},_getGlobalFacetedMinMaxValues:table.options.getFacetedMinMaxValues&&table.options.getFacetedMinMaxValues(table,"__global__"),getGlobalFacetedMinMaxValues:()=>{if(!table._getGlobalFacetedMinMaxValues){return}return table._getGlobalFacetedMinMaxValues()}})};function shouldAutoRemoveFilter(filterFn,value,column){return(filterFn&&filterFn.autoRemove?filterFn.autoRemove(value,column):false)||typeof value==="undefined"||typeof value==="string"&&!value}const sum=(columnId,_leafRows,childRows)=>childRows.reduce(((sum2,next)=>{const nextValue2=next.getValue(columnId);return sum2+(typeof nextValue2==="number"?nextValue2:0)}),0);const min$1=(columnId,_leafRows,childRows)=>{let min2;childRows.forEach((row=>{const value=row.getValue(columnId);if(value!=null&&(min2>value||min2===void 0&&value>=value)){min2=value}}));return min2};const max=(columnId,_leafRows,childRows)=>{let max2;childRows.forEach((row=>{const value=row.getValue(columnId);if(value!=null&&(max2<value||max2===void 0&&value>=value)){max2=value}}));return max2};const extent=(columnId,_leafRows,childRows)=>{let min2;let max2;childRows.forEach((row=>{const value=row.getValue(columnId);if(value!=null){if(min2===void 0){if(value>=value)min2=max2=value}else{if(min2>value)min2=value;if(max2<value)max2=value}}}));return[min2,max2]};const mean=(columnId,leafRows)=>{let count2=0;let sum2=0;leafRows.forEach((row=>{let value=row.getValue(columnId);if(value!=null&&(value=+value)>=value){++count2,sum2+=value}}));if(count2)return sum2/count2;return};const median=(columnId,leafRows)=>{if(!leafRows.length){return}const values=leafRows.map((row=>row.getValue(columnId)));if(!isNumberArray(values)){return}if(values.length===1){return values[0]}const mid=Math.floor(values.length/2);const nums=values.sort(((a,b)=>a-b));return values.length%2!==0?nums[mid]:(nums[mid-1]+nums[mid])/2};const unique=(columnId,leafRows)=>Array.from(new Set(leafRows.map((d=>d.getValue(columnId)))).values());const uniqueCount=(columnId,leafRows)=>new Set(leafRows.map((d=>d.getValue(columnId)))).size;const count=(_columnId,leafRows)=>leafRows.length;const aggregationFns={sum:sum,min:min$1,max:max,extent:extent,mean:mean,median:median,unique:unique,uniqueCount:uniqueCount,count:count};const Grouping={getDefaultColumnDef:()=>({aggregatedCell:props=>{var _toString,_props$getValue;return(_toString=(_props$getValue=props.getValue())==null?void 0:_props$getValue.toString==null?void 0:_props$getValue.toString())!=null?_toString:null},aggregationFn:"auto"}),getInitialState:state=>({grouping:[],...state}),getDefaultOptions:table=>({onGroupingChange:makeStateUpdater("grouping",table),groupedColumnMode:"reorder"}),createColumn:(column,table)=>({toggleGrouping:()=>{table.setGrouping((old=>{if(old!=null&&old.includes(column.id)){return old.filter((d=>d!==column.id))}return[...old!=null?old:[],column.id]}))},getCanGroup:()=>{var _ref,_ref2,_ref3,_column$columnDef$ena;return(_ref=(_ref2=(_ref3=(_column$columnDef$ena=column.columnDef.enableGrouping)!=null?_column$columnDef$ena:true)!=null?_ref3:table.options.enableGrouping)!=null?_ref2:true)!=null?_ref:!!column.accessorFn},getIsGrouped:()=>{var _table$getState$group;return(_table$getState$group=table.getState().grouping)==null?void 0:_table$getState$group.includes(column.id)},getGroupedIndex:()=>{var _table$getState$group2;return(_table$getState$group2=table.getState().grouping)==null?void 0:_table$getState$group2.indexOf(column.id)},getToggleGroupingHandler:()=>{const canGroup=column.getCanGroup();return()=>{if(!canGroup)return;column.toggleGrouping()}},getAutoAggregationFn:()=>{const firstRow=table.getCoreRowModel().flatRows[0];const value=firstRow==null?void 0:firstRow.getValue(column.id);if(typeof value==="number"){return aggregationFns.sum}if(Object.prototype.toString.call(value)==="[object Date]"){return aggregationFns.extent}},getAggregationFn:()=>{var _table$options$aggreg,_table$options$aggreg2;if(!column){throw new Error}return isFunction$3(column.columnDef.aggregationFn)?column.columnDef.aggregationFn:column.columnDef.aggregationFn==="auto"?column.getAutoAggregationFn():(_table$options$aggreg=(_table$options$aggreg2=table.options.aggregationFns)==null?void 0:_table$options$aggreg2[column.columnDef.aggregationFn])!=null?_table$options$aggreg:aggregationFns[column.columnDef.aggregationFn]}}),createTable:table=>({setGrouping:updater=>table.options.onGroupingChange==null?void 0:table.options.onGroupingChange(updater),resetGrouping:defaultState2=>{var _table$initialState$g,_table$initialState;table.setGrouping(defaultState2?[]:(_table$initialState$g=(_table$initialState=table.initialState)==null?void 0:_table$initialState.grouping)!=null?_table$initialState$g:[])},getPreGroupedRowModel:()=>table.getFilteredRowModel(),getGroupedRowModel:()=>{if(!table._getGroupedRowModel&&table.options.getGroupedRowModel){table._getGroupedRowModel=table.options.getGroupedRowModel(table)}if(table.options.manualGrouping||!table._getGroupedRowModel){return table.getPreGroupedRowModel()}return table._getGroupedRowModel()}}),createRow:(row,table)=>({getIsGrouped:()=>!!row.groupingColumnId,getGroupingValue:columnId=>{if(row._groupingValuesCache.hasOwnProperty(columnId)){return row._groupingValuesCache[columnId]}const column=table.getColumn(columnId);if(!(column!=null&&column.columnDef.getGroupingValue)){return row.getValue(columnId)}row._groupingValuesCache[columnId]=column.columnDef.getGroupingValue(row.original);return row._groupingValuesCache[columnId]},_groupingValuesCache:{}}),createCell:(cell,column,row,table)=>({getIsGrouped:()=>column.getIsGrouped()&&column.id===row.groupingColumnId,getIsPlaceholder:()=>!cell.getIsGrouped()&&column.getIsGrouped(),getIsAggregated:()=>{var _row$subRows;return!cell.getIsGrouped()&&!cell.getIsPlaceholder()&&!!((_row$subRows=row.subRows)!=null&&_row$subRows.length)}})};function orderColumns(leafColumns,grouping,groupedColumnMode){if(!(grouping!=null&&grouping.length)||!groupedColumnMode){return leafColumns}const nonGroupingColumns=leafColumns.filter((col=>!grouping.includes(col.id)));if(groupedColumnMode==="remove"){return nonGroupingColumns}const groupingColumns=grouping.map((g=>leafColumns.find((col=>col.id===g)))).filter(Boolean);return[...groupingColumns,...nonGroupingColumns]}const Ordering={getInitialState:state=>({columnOrder:[],...state}),getDefaultOptions:table=>({onColumnOrderChange:makeStateUpdater("columnOrder",table)}),createTable:table=>({setColumnOrder:updater=>table.options.onColumnOrderChange==null?void 0:table.options.onColumnOrderChange(updater),resetColumnOrder:defaultState2=>{var _table$initialState$c;table.setColumnOrder(defaultState2?[]:(_table$initialState$c=table.initialState.columnOrder)!=null?_table$initialState$c:[])},_getOrderColumnsFn:memo((()=>[table.getState().columnOrder,table.getState().grouping,table.options.groupedColumnMode]),((columnOrder,grouping,groupedColumnMode)=>columns=>{let orderedColumns=[];if(!(columnOrder!=null&&columnOrder.length)){orderedColumns=columns}else{const columnOrderCopy=[...columnOrder];const columnsCopy=[...columns];while(columnsCopy.length&&columnOrderCopy.length){const targetColumnId=columnOrderCopy.shift();const foundIndex=columnsCopy.findIndex((d=>d.id===targetColumnId));if(foundIndex>-1){orderedColumns.push(columnsCopy.splice(foundIndex,1)[0])}}orderedColumns=[...orderedColumns,...columnsCopy]}return orderColumns(orderedColumns,grouping,groupedColumnMode)}),{key:false})})};const defaultPageIndex=0;const defaultPageSize=10;const getDefaultPaginationState=()=>({pageIndex:defaultPageIndex,pageSize:defaultPageSize});const Pagination={getInitialState:state=>({...state,pagination:{...getDefaultPaginationState(),...state==null?void 0:state.pagination}}),getDefaultOptions:table=>({onPaginationChange:makeStateUpdater("pagination",table)}),createTable:table=>{let registered=false;let queued=false;return{_autoResetPageIndex:()=>{var _ref,_table$options$autoRe;if(!registered){table._queue((()=>{registered=true}));return}if((_ref=(_table$options$autoRe=table.options.autoResetAll)!=null?_table$options$autoRe:table.options.autoResetPageIndex)!=null?_ref:!table.options.manualPagination){if(queued)return;queued=true;table._queue((()=>{table.resetPageIndex();queued=false}))}},setPagination:updater=>{const safeUpdater=old=>{let newState=functionalUpdate(updater,old);return newState};return table.options.onPaginationChange==null?void 0:table.options.onPaginationChange(safeUpdater)},resetPagination:defaultState2=>{var _table$initialState$p;table.setPagination(defaultState2?getDefaultPaginationState():(_table$initialState$p=table.initialState.pagination)!=null?_table$initialState$p:getDefaultPaginationState())},setPageIndex:updater=>{table.setPagination((old=>{let pageIndex=functionalUpdate(updater,old.pageIndex);const maxPageIndex=typeof table.options.pageCount==="undefined"||table.options.pageCount===-1?Number.MAX_SAFE_INTEGER:table.options.pageCount-1;pageIndex=Math.max(0,Math.min(pageIndex,maxPageIndex));return{...old,pageIndex:pageIndex}}))},resetPageIndex:defaultState2=>{var _table$initialState$p2,_table$initialState,_table$initialState$p3;table.setPageIndex(defaultState2?defaultPageIndex:(_table$initialState$p2=(_table$initialState=table.initialState)==null?void 0:(_table$initialState$p3=_table$initialState.pagination)==null?void 0:_table$initialState$p3.pageIndex)!=null?_table$initialState$p2:defaultPageIndex)},resetPageSize:defaultState2=>{var _table$initialState$p4,_table$initialState2,_table$initialState2$;table.setPageSize(defaultState2?defaultPageSize:(_table$initialState$p4=(_table$initialState2=table.initialState)==null?void 0:(_table$initialState2$=_table$initialState2.pagination)==null?void 0:_table$initialState2$.pageSize)!=null?_table$initialState$p4:defaultPageSize)},setPageSize:updater=>{table.setPagination((old=>{const pageSize=Math.max(1,functionalUpdate(updater,old.pageSize));const topRowIndex=old.pageSize*old.pageIndex;const pageIndex=Math.floor(topRowIndex/pageSize);return{...old,pageIndex:pageIndex,pageSize:pageSize}}))},setPageCount:updater=>table.setPagination((old=>{var _table$options$pageCo;let newPageCount=functionalUpdate(updater,(_table$options$pageCo=table.options.pageCount)!=null?_table$options$pageCo:-1);if(typeof newPageCount==="number"){newPageCount=Math.max(-1,newPageCount)}return{...old,pageCount:newPageCount}})),getPageOptions:memo((()=>[table.getPageCount()]),(pageCount=>{let pageOptions=[];if(pageCount&&pageCount>0){pageOptions=[...new Array(pageCount)].fill(null).map(((_,i)=>i))}return pageOptions}),{key:false,debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugTable}}),getCanPreviousPage:()=>table.getState().pagination.pageIndex>0,getCanNextPage:()=>{const{pageIndex:pageIndex}=table.getState().pagination;const pageCount=table.getPageCount();if(pageCount===-1){return true}if(pageCount===0){return false}return pageIndex<pageCount-1},previousPage:()=>table.setPageIndex((old=>old-1)),nextPage:()=>table.setPageIndex((old=>old+1)),getPrePaginationRowModel:()=>table.getExpandedRowModel(),getPaginationRowModel:()=>{if(!table._getPaginationRowModel&&table.options.getPaginationRowModel){table._getPaginationRowModel=table.options.getPaginationRowModel(table)}if(table.options.manualPagination||!table._getPaginationRowModel){return table.getPrePaginationRowModel()}return table._getPaginationRowModel()},getPageCount:()=>{var _table$options$pageCo2;return(_table$options$pageCo2=table.options.pageCount)!=null?_table$options$pageCo2:Math.ceil(table.getPrePaginationRowModel().rows.length/table.getState().pagination.pageSize)}}}};const getDefaultPinningState=()=>({left:[],right:[]});const Pinning={getInitialState:state=>({columnPinning:getDefaultPinningState(),...state}),getDefaultOptions:table=>({onColumnPinningChange:makeStateUpdater("columnPinning",table)}),createColumn:(column,table)=>({pin:position=>{const columnIds=column.getLeafColumns().map((d=>d.id)).filter(Boolean);table.setColumnPinning((old=>{var _old$left3,_old$right3;if(position==="right"){var _old$left,_old$right;return{left:((_old$left=old==null?void 0:old.left)!=null?_old$left:[]).filter((d=>!(columnIds!=null&&columnIds.includes(d)))),right:[...((_old$right=old==null?void 0:old.right)!=null?_old$right:[]).filter((d=>!(columnIds!=null&&columnIds.includes(d)))),...columnIds]}}if(position==="left"){var _old$left2,_old$right2;return{left:[...((_old$left2=old==null?void 0:old.left)!=null?_old$left2:[]).filter((d=>!(columnIds!=null&&columnIds.includes(d)))),...columnIds],right:((_old$right2=old==null?void 0:old.right)!=null?_old$right2:[]).filter((d=>!(columnIds!=null&&columnIds.includes(d))))}}return{left:((_old$left3=old==null?void 0:old.left)!=null?_old$left3:[]).filter((d=>!(columnIds!=null&&columnIds.includes(d)))),right:((_old$right3=old==null?void 0:old.right)!=null?_old$right3:[]).filter((d=>!(columnIds!=null&&columnIds.includes(d))))}}))},getCanPin:()=>{const leafColumns=column.getLeafColumns();return leafColumns.some((d=>{var _d$columnDef$enablePi,_table$options$enable;return((_d$columnDef$enablePi=d.columnDef.enablePinning)!=null?_d$columnDef$enablePi:true)&&((_table$options$enable=table.options.enablePinning)!=null?_table$options$enable:true)}))},getIsPinned:()=>{const leafColumnIds=column.getLeafColumns().map((d=>d.id));const{left:left,right:right}=table.getState().columnPinning;const isLeft=leafColumnIds.some((d=>left==null?void 0:left.includes(d)));const isRight=leafColumnIds.some((d=>right==null?void 0:right.includes(d)));return isLeft?"left":isRight?"right":false},getPinnedIndex:()=>{var _table$getState$colum,_table$getState$colum2,_table$getState$colum3;const position=column.getIsPinned();return position?(_table$getState$colum=(_table$getState$colum2=table.getState().columnPinning)==null?void 0:(_table$getState$colum3=_table$getState$colum2[position])==null?void 0:_table$getState$colum3.indexOf(column.id))!=null?_table$getState$colum:-1:0}}),createRow:(row,table)=>({getCenterVisibleCells:memo((()=>[row._getAllVisibleCells(),table.getState().columnPinning.left,table.getState().columnPinning.right]),((allCells,left,right)=>{const leftAndRight=[...left!=null?left:[],...right!=null?right:[]];return allCells.filter((d=>!leftAndRight.includes(d.column.id)))}),{key:"row.getCenterVisibleCells",debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugRows}}),getLeftVisibleCells:memo((()=>[row._getAllVisibleCells(),table.getState().columnPinning.left,,]),((allCells,left)=>{const cells=(left!=null?left:[]).map((columnId=>allCells.find((cell=>cell.column.id===columnId)))).filter(Boolean).map((d=>({...d,position:"left"})));return cells}),{key:"row.getLeftVisibleCells",debug:()=>{var _table$options$debugA2;return(_table$options$debugA2=table.options.debugAll)!=null?_table$options$debugA2:table.options.debugRows}}),getRightVisibleCells:memo((()=>[row._getAllVisibleCells(),table.getState().columnPinning.right]),((allCells,right)=>{const cells=(right!=null?right:[]).map((columnId=>allCells.find((cell=>cell.column.id===columnId)))).filter(Boolean).map((d=>({...d,position:"right"})));return cells}),{key:"row.getRightVisibleCells",debug:()=>{var _table$options$debugA3;return(_table$options$debugA3=table.options.debugAll)!=null?_table$options$debugA3:table.options.debugRows}})}),createTable:table=>({setColumnPinning:updater=>table.options.onColumnPinningChange==null?void 0:table.options.onColumnPinningChange(updater),resetColumnPinning:defaultState2=>{var _table$initialState$c,_table$initialState;return table.setColumnPinning(defaultState2?getDefaultPinningState():(_table$initialState$c=(_table$initialState=table.initialState)==null?void 0:_table$initialState.columnPinning)!=null?_table$initialState$c:getDefaultPinningState())},getIsSomeColumnsPinned:position=>{var _pinningState$positio;const pinningState=table.getState().columnPinning;if(!position){var _pinningState$left,_pinningState$right;return Boolean(((_pinningState$left=pinningState.left)==null?void 0:_pinningState$left.length)||((_pinningState$right=pinningState.right)==null?void 0:_pinningState$right.length))}return Boolean((_pinningState$positio=pinningState[position])==null?void 0:_pinningState$positio.length)},getLeftLeafColumns:memo((()=>[table.getAllLeafColumns(),table.getState().columnPinning.left]),((allColumns,left)=>(left!=null?left:[]).map((columnId=>allColumns.find((column=>column.id===columnId)))).filter(Boolean)),{key:false,debug:()=>{var _table$options$debugA4;return(_table$options$debugA4=table.options.debugAll)!=null?_table$options$debugA4:table.options.debugColumns}}),getRightLeafColumns:memo((()=>[table.getAllLeafColumns(),table.getState().columnPinning.right]),((allColumns,right)=>(right!=null?right:[]).map((columnId=>allColumns.find((column=>column.id===columnId)))).filter(Boolean)),{key:false,debug:()=>{var _table$options$debugA5;return(_table$options$debugA5=table.options.debugAll)!=null?_table$options$debugA5:table.options.debugColumns}}),getCenterLeafColumns:memo((()=>[table.getAllLeafColumns(),table.getState().columnPinning.left,table.getState().columnPinning.right]),((allColumns,left,right)=>{const leftAndRight=[...left!=null?left:[],...right!=null?right:[]];return allColumns.filter((d=>!leftAndRight.includes(d.id)))}),{key:false,debug:()=>{var _table$options$debugA6;return(_table$options$debugA6=table.options.debugAll)!=null?_table$options$debugA6:table.options.debugColumns}})})};const RowSelection={getInitialState:state=>({rowSelection:{},...state}),getDefaultOptions:table=>({onRowSelectionChange:makeStateUpdater("rowSelection",table),enableRowSelection:true,enableMultiRowSelection:true,enableSubRowSelection:true}),createTable:table=>({setRowSelection:updater=>table.options.onRowSelectionChange==null?void 0:table.options.onRowSelectionChange(updater),resetRowSelection:defaultState2=>{var _table$initialState$r;return table.setRowSelection(defaultState2?{}:(_table$initialState$r=table.initialState.rowSelection)!=null?_table$initialState$r:{})},toggleAllRowsSelected:value=>{table.setRowSelection((old=>{value=typeof value!=="undefined"?value:!table.getIsAllRowsSelected();const rowSelection={...old};const preGroupedFlatRows=table.getPreGroupedRowModel().flatRows;if(value){preGroupedFlatRows.forEach((row=>{if(!row.getCanSelect()){return}rowSelection[row.id]=true}))}else{preGroupedFlatRows.forEach((row=>{delete rowSelection[row.id]}))}return rowSelection}))},toggleAllPageRowsSelected:value=>table.setRowSelection((old=>{const resolvedValue=typeof value!=="undefined"?value:!table.getIsAllPageRowsSelected();const rowSelection={...old};table.getRowModel().rows.forEach((row=>{mutateRowIsSelected(rowSelection,row.id,resolvedValue,table)}));return rowSelection})),getPreSelectedRowModel:()=>table.getCoreRowModel(),getSelectedRowModel:memo((()=>[table.getState().rowSelection,table.getCoreRowModel()]),((rowSelection,rowModel)=>{if(!Object.keys(rowSelection).length){return{rows:[],flatRows:[],rowsById:{}}}return selectRowsFn(table,rowModel)}),{key:false,debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugTable}}),getFilteredSelectedRowModel:memo((()=>[table.getState().rowSelection,table.getFilteredRowModel()]),((rowSelection,rowModel)=>{if(!Object.keys(rowSelection).length){return{rows:[],flatRows:[],rowsById:{}}}return selectRowsFn(table,rowModel)}),{key:"getFilteredSelectedRowModel",debug:()=>{var _table$options$debugA2;return(_table$options$debugA2=table.options.debugAll)!=null?_table$options$debugA2:table.options.debugTable}}),getGroupedSelectedRowModel:memo((()=>[table.getState().rowSelection,table.getSortedRowModel()]),((rowSelection,rowModel)=>{if(!Object.keys(rowSelection).length){return{rows:[],flatRows:[],rowsById:{}}}return selectRowsFn(table,rowModel)}),{key:"getGroupedSelectedRowModel",debug:()=>{var _table$options$debugA3;return(_table$options$debugA3=table.options.debugAll)!=null?_table$options$debugA3:table.options.debugTable}}),getIsAllRowsSelected:()=>{const preGroupedFlatRows=table.getFilteredRowModel().flatRows;const{rowSelection:rowSelection}=table.getState();let isAllRowsSelected=Boolean(preGroupedFlatRows.length&&Object.keys(rowSelection).length);if(isAllRowsSelected){if(preGroupedFlatRows.some((row=>row.getCanSelect()&&!rowSelection[row.id]))){isAllRowsSelected=false}}return isAllRowsSelected},getIsAllPageRowsSelected:()=>{const paginationFlatRows=table.getPaginationRowModel().flatRows.filter((row=>row.getCanSelect()));const{rowSelection:rowSelection}=table.getState();let isAllPageRowsSelected=!!paginationFlatRows.length;if(isAllPageRowsSelected&&paginationFlatRows.some((row=>!rowSelection[row.id]))){isAllPageRowsSelected=false}return isAllPageRowsSelected},getIsSomeRowsSelected:()=>{var _table$getState$rowSe;const totalSelected=Object.keys((_table$getState$rowSe=table.getState().rowSelection)!=null?_table$getState$rowSe:{}).length;return totalSelected>0&&totalSelected<table.getFilteredRowModel().flatRows.length},getIsSomePageRowsSelected:()=>{const paginationFlatRows=table.getPaginationRowModel().flatRows;return table.getIsAllPageRowsSelected()?false:paginationFlatRows.filter((row=>row.getCanSelect())).some((d=>d.getIsSelected()||d.getIsSomeSelected()))},getToggleAllRowsSelectedHandler:()=>e=>{table.toggleAllRowsSelected(e.target.checked)},getToggleAllPageRowsSelectedHandler:()=>e=>{table.toggleAllPageRowsSelected(e.target.checked)}}),createRow:(row,table)=>({toggleSelected:value=>{const isSelected=row.getIsSelected();table.setRowSelection((old=>{value=typeof value!=="undefined"?value:!isSelected;if(isSelected===value){return old}const selectedRowIds={...old};mutateRowIsSelected(selectedRowIds,row.id,value,table);return selectedRowIds}))},getIsSelected:()=>{const{rowSelection:rowSelection}=table.getState();return isRowSelected(row,rowSelection)},getIsSomeSelected:()=>{const{rowSelection:rowSelection}=table.getState();return isSubRowSelected(row,rowSelection)==="some"},getIsAllSubRowsSelected:()=>{const{rowSelection:rowSelection}=table.getState();return isSubRowSelected(row,rowSelection)==="all"},getCanSelect:()=>{var _table$options$enable;if(typeof table.options.enableRowSelection==="function"){return table.options.enableRowSelection(row)}return(_table$options$enable=table.options.enableRowSelection)!=null?_table$options$enable:true},getCanSelectSubRows:()=>{var _table$options$enable2;if(typeof table.options.enableSubRowSelection==="function"){return table.options.enableSubRowSelection(row)}return(_table$options$enable2=table.options.enableSubRowSelection)!=null?_table$options$enable2:true},getCanMultiSelect:()=>{var _table$options$enable3;if(typeof table.options.enableMultiRowSelection==="function"){return table.options.enableMultiRowSelection(row)}return(_table$options$enable3=table.options.enableMultiRowSelection)!=null?_table$options$enable3:true},getToggleSelectedHandler:()=>{const canSelect=row.getCanSelect();return e=>{var _target;if(!canSelect)return;row.toggleSelected((_target=e.target)==null?void 0:_target.checked)}}})};const mutateRowIsSelected=(selectedRowIds,id,value,table)=>{var _row$subRows;const row=table.getRow(id);if(value){if(!row.getCanMultiSelect()){Object.keys(selectedRowIds).forEach((key=>delete selectedRowIds[key]))}if(row.getCanSelect()){selectedRowIds[id]=true}}else{delete selectedRowIds[id]}if((_row$subRows=row.subRows)!=null&&_row$subRows.length&&row.getCanSelectSubRows()){row.subRows.forEach((row2=>mutateRowIsSelected(selectedRowIds,row2.id,value,table)))}};function selectRowsFn(table,rowModel){const rowSelection=table.getState().rowSelection;const newSelectedFlatRows=[];const newSelectedRowsById={};const recurseRows=function(rows,depth){return rows.map((row=>{var _row$subRows2;const isSelected=isRowSelected(row,rowSelection);if(isSelected){newSelectedFlatRows.push(row);newSelectedRowsById[row.id]=row}if((_row$subRows2=row.subRows)!=null&&_row$subRows2.length){row={...row,subRows:recurseRows(row.subRows)}}if(isSelected){return row}})).filter(Boolean)};return{rows:recurseRows(rowModel.rows),flatRows:newSelectedFlatRows,rowsById:newSelectedRowsById}}function isRowSelected(row,selection){var _selection$row$id;return(_selection$row$id=selection[row.id])!=null?_selection$row$id:false}function isSubRowSelected(row,selection,table){if(row.subRows&&row.subRows.length){let allChildrenSelected=true;let someSelected=false;row.subRows.forEach((subRow=>{if(someSelected&&!allChildrenSelected){return}if(isRowSelected(subRow,selection)){someSelected=true}else{allChildrenSelected=false}}));return allChildrenSelected?"all":someSelected?"some":false}return false}const reSplitAlphaNumeric=/([0-9]+)/gm;const alphanumeric=(rowA,rowB,columnId)=>compareAlphanumeric(toString(rowA.getValue(columnId)).toLowerCase(),toString(rowB.getValue(columnId)).toLowerCase());const alphanumericCaseSensitive=(rowA,rowB,columnId)=>compareAlphanumeric(toString(rowA.getValue(columnId)),toString(rowB.getValue(columnId)));const text=(rowA,rowB,columnId)=>compareBasic(toString(rowA.getValue(columnId)).toLowerCase(),toString(rowB.getValue(columnId)).toLowerCase());const textCaseSensitive=(rowA,rowB,columnId)=>compareBasic(toString(rowA.getValue(columnId)),toString(rowB.getValue(columnId)));const datetime=(rowA,rowB,columnId)=>{const a=rowA.getValue(columnId);const b=rowB.getValue(columnId);return a>b?1:a<b?-1:0};const basic=(rowA,rowB,columnId)=>compareBasic(rowA.getValue(columnId),rowB.getValue(columnId));function compareBasic(a,b){return a===b?0:a>b?1:-1}function toString(a){if(typeof a==="number"){if(isNaN(a)||a===Infinity||a===-Infinity){return""}return String(a)}if(typeof a==="string"){return a}return""}function compareAlphanumeric(aStr,bStr){const a=aStr.split(reSplitAlphaNumeric).filter(Boolean);const b=bStr.split(reSplitAlphaNumeric).filter(Boolean);while(a.length&&b.length){const aa=a.shift();const bb=b.shift();const an=parseInt(aa,10);const bn=parseInt(bb,10);const combo=[an,bn].sort();if(isNaN(combo[0])){if(aa>bb){return 1}if(bb>aa){return-1}continue}if(isNaN(combo[1])){return isNaN(an)?-1:1}if(an>bn){return 1}if(bn>an){return-1}}return a.length-b.length}const sortingFns={alphanumeric:alphanumeric,alphanumericCaseSensitive:alphanumericCaseSensitive,text:text,textCaseSensitive:textCaseSensitive,datetime:datetime,basic:basic};const Sorting={getInitialState:state=>({sorting:[],...state}),getDefaultColumnDef:()=>({sortingFn:"auto"}),getDefaultOptions:table=>({onSortingChange:makeStateUpdater("sorting",table),isMultiSortEvent:e=>e.shiftKey}),createColumn:(column,table)=>({getAutoSortingFn:()=>{const firstRows=table.getFilteredRowModel().flatRows.slice(10);let isString=false;for(const row of firstRows){const value=row==null?void 0:row.getValue(column.id);if(Object.prototype.toString.call(value)==="[object Date]"){return sortingFns.datetime}if(typeof value==="string"){isString=true;if(value.split(reSplitAlphaNumeric).length>1){return sortingFns.alphanumeric}}}if(isString){return sortingFns.text}return sortingFns.basic},getAutoSortDir:()=>{const firstRow=table.getFilteredRowModel().flatRows[0];const value=firstRow==null?void 0:firstRow.getValue(column.id);if(typeof value==="string"){return"asc"}return"desc"},getSortingFn:()=>{var _table$options$sortin,_table$options$sortin2;if(!column){throw new Error}return isFunction$3(column.columnDef.sortingFn)?column.columnDef.sortingFn:column.columnDef.sortingFn==="auto"?column.getAutoSortingFn():(_table$options$sortin=(_table$options$sortin2=table.options.sortingFns)==null?void 0:_table$options$sortin2[column.columnDef.sortingFn])!=null?_table$options$sortin:sortingFns[column.columnDef.sortingFn]},toggleSorting:(desc,multi)=>{const nextSortingOrder=column.getNextSortingOrder();const hasManualValue=typeof desc!=="undefined"&&desc!==null;table.setSorting((old=>{const existingSorting=old==null?void 0:old.find((d=>d.id===column.id));const existingIndex=old==null?void 0:old.findIndex((d=>d.id===column.id));let newSorting=[];let sortAction;let nextDesc=hasManualValue?desc:nextSortingOrder==="desc";if(old!=null&&old.length&&column.getCanMultiSort()&&multi){if(existingSorting){sortAction="toggle"}else{sortAction="add"}}else{if(old!=null&&old.length&&existingIndex!==old.length-1){sortAction="replace"}else if(existingSorting){sortAction="toggle"}else{sortAction="replace"}}if(sortAction==="toggle"){if(!hasManualValue){if(!nextSortingOrder){sortAction="remove"}}}if(sortAction==="add"){var _table$options$maxMul;newSorting=[...old,{id:column.id,desc:nextDesc}];newSorting.splice(0,newSorting.length-((_table$options$maxMul=table.options.maxMultiSortColCount)!=null?_table$options$maxMul:Number.MAX_SAFE_INTEGER))}else if(sortAction==="toggle"){newSorting=old.map((d=>{if(d.id===column.id){return{...d,desc:nextDesc}}return d}))}else if(sortAction==="remove"){newSorting=old.filter((d=>d.id!==column.id))}else{newSorting=[{id:column.id,desc:nextDesc}]}return newSorting}))},getFirstSortDir:()=>{var _ref,_column$columnDef$sor;const sortDescFirst=(_ref=(_column$columnDef$sor=column.columnDef.sortDescFirst)!=null?_column$columnDef$sor:table.options.sortDescFirst)!=null?_ref:column.getAutoSortDir()==="desc";return sortDescFirst?"desc":"asc"},getNextSortingOrder:multi=>{var _table$options$enable,_table$options$enable2;const firstSortDirection=column.getFirstSortDir();const isSorted=column.getIsSorted();if(!isSorted){return firstSortDirection}if(isSorted!==firstSortDirection&&((_table$options$enable=table.options.enableSortingRemoval)!=null?_table$options$enable:true)&&(multi?(_table$options$enable2=table.options.enableMultiRemove)!=null?_table$options$enable2:true:true)){return false}return isSorted==="desc"?"asc":"desc"},getCanSort:()=>{var _column$columnDef$ena,_table$options$enable3;return((_column$columnDef$ena=column.columnDef.enableSorting)!=null?_column$columnDef$ena:true)&&((_table$options$enable3=table.options.enableSorting)!=null?_table$options$enable3:true)&&!!column.accessorFn},getCanMultiSort:()=>{var _ref2,_column$columnDef$ena2;return(_ref2=(_column$columnDef$ena2=column.columnDef.enableMultiSort)!=null?_column$columnDef$ena2:table.options.enableMultiSort)!=null?_ref2:!!column.accessorFn},getIsSorted:()=>{var _table$getState$sorti;const columnSort=(_table$getState$sorti=table.getState().sorting)==null?void 0:_table$getState$sorti.find((d=>d.id===column.id));return!columnSort?false:columnSort.desc?"desc":"asc"},getSortIndex:()=>{var _table$getState$sorti2,_table$getState$sorti3;return(_table$getState$sorti2=(_table$getState$sorti3=table.getState().sorting)==null?void 0:_table$getState$sorti3.findIndex((d=>d.id===column.id)))!=null?_table$getState$sorti2:-1},clearSorting:()=>{table.setSorting((old=>old!=null&&old.length?old.filter((d=>d.id!==column.id)):[]))},getToggleSortingHandler:()=>{const canSort=column.getCanSort();return e=>{if(!canSort)return;e.persist==null?void 0:e.persist();column.toggleSorting==null?void 0:column.toggleSorting(void 0,column.getCanMultiSort()?table.options.isMultiSortEvent==null?void 0:table.options.isMultiSortEvent(e):false)}}}),createTable:table=>({setSorting:updater=>table.options.onSortingChange==null?void 0:table.options.onSortingChange(updater),resetSorting:defaultState2=>{var _table$initialState$s,_table$initialState;table.setSorting(defaultState2?[]:(_table$initialState$s=(_table$initialState=table.initialState)==null?void 0:_table$initialState.sorting)!=null?_table$initialState$s:[])},getPreSortedRowModel:()=>table.getGroupedRowModel(),getSortedRowModel:()=>{if(!table._getSortedRowModel&&table.options.getSortedRowModel){table._getSortedRowModel=table.options.getSortedRowModel(table)}if(table.options.manualSorting||!table._getSortedRowModel){return table.getPreSortedRowModel()}return table._getSortedRowModel()}})};const Visibility={getInitialState:state=>({columnVisibility:{},...state}),getDefaultOptions:table=>({onColumnVisibilityChange:makeStateUpdater("columnVisibility",table)}),createColumn:(column,table)=>({toggleVisibility:value=>{if(column.getCanHide()){table.setColumnVisibility((old=>({...old,[column.id]:value!=null?value:!column.getIsVisible()})))}},getIsVisible:()=>{var _table$getState$colum,_table$getState$colum2;return(_table$getState$colum=(_table$getState$colum2=table.getState().columnVisibility)==null?void 0:_table$getState$colum2[column.id])!=null?_table$getState$colum:true},getCanHide:()=>{var _column$columnDef$ena,_table$options$enable;return((_column$columnDef$ena=column.columnDef.enableHiding)!=null?_column$columnDef$ena:true)&&((_table$options$enable=table.options.enableHiding)!=null?_table$options$enable:true)},getToggleVisibilityHandler:()=>e=>{column.toggleVisibility==null?void 0:column.toggleVisibility(e.target.checked)}}),createRow:(row,table)=>({_getAllVisibleCells:memo((()=>[row.getAllCells(),table.getState().columnVisibility]),(cells=>cells.filter((cell=>cell.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugRows}}),getVisibleCells:memo((()=>[row.getLeftVisibleCells(),row.getCenterVisibleCells(),row.getRightVisibleCells()]),((left,center,right)=>[...left,...center,...right]),{key:false,debug:()=>{var _table$options$debugA2;return(_table$options$debugA2=table.options.debugAll)!=null?_table$options$debugA2:table.options.debugRows}})}),createTable:table=>{const makeVisibleColumnsMethod=(key,getColumns)=>memo((()=>[getColumns(),getColumns().filter((d=>d.getIsVisible())).map((d=>d.id)).join("_")]),(columns=>columns.filter((d=>d.getIsVisible==null?void 0:d.getIsVisible()))),{key:key,debug:()=>{var _table$options$debugA3;return(_table$options$debugA3=table.options.debugAll)!=null?_table$options$debugA3:table.options.debugColumns}});return{getVisibleFlatColumns:makeVisibleColumnsMethod("getVisibleFlatColumns",(()=>table.getAllFlatColumns())),getVisibleLeafColumns:makeVisibleColumnsMethod("getVisibleLeafColumns",(()=>table.getAllLeafColumns())),getLeftVisibleLeafColumns:makeVisibleColumnsMethod("getLeftVisibleLeafColumns",(()=>table.getLeftLeafColumns())),getRightVisibleLeafColumns:makeVisibleColumnsMethod("getRightVisibleLeafColumns",(()=>table.getRightLeafColumns())),getCenterVisibleLeafColumns:makeVisibleColumnsMethod("getCenterVisibleLeafColumns",(()=>table.getCenterLeafColumns())),setColumnVisibility:updater=>table.options.onColumnVisibilityChange==null?void 0:table.options.onColumnVisibilityChange(updater),resetColumnVisibility:defaultState2=>{var _table$initialState$c;table.setColumnVisibility(defaultState2?{}:(_table$initialState$c=table.initialState.columnVisibility)!=null?_table$initialState$c:{})},toggleAllColumnsVisible:value=>{var _value;value=(_value=value)!=null?_value:!table.getIsAllColumnsVisible();table.setColumnVisibility(table.getAllLeafColumns().reduce(((obj,column)=>({...obj,[column.id]:!value?!(column.getCanHide!=null&&column.getCanHide()):value})),{}))},getIsAllColumnsVisible:()=>!table.getAllLeafColumns().some((column=>!(column.getIsVisible!=null&&column.getIsVisible()))),getIsSomeColumnsVisible:()=>table.getAllLeafColumns().some((column=>column.getIsVisible==null?void 0:column.getIsVisible())),getToggleAllColumnsVisibilityHandler:()=>e=>{var _target;table.toggleAllColumnsVisible((_target=e.target)==null?void 0:_target.checked)}}}};const features=[Headers,Visibility,Ordering,Pinning,Filters,Sorting,Grouping,Expanding,Pagination,RowSelection,ColumnSizing];function createTable(options){var _options$initialState;if(options.debugAll||options.debugTable){console.info("Creating Table Instance...")}let table={_features:features};const defaultOptions2=table._features.reduce(((obj,feature)=>Object.assign(obj,feature.getDefaultOptions==null?void 0:feature.getDefaultOptions(table))),{});const mergeOptions=options2=>{if(table.options.mergeOptions){return table.options.mergeOptions(defaultOptions2,options2)}return{...defaultOptions2,...options2}};const coreInitialState={};let initialState2={...coreInitialState,...(_options$initialState=options.initialState)!=null?_options$initialState:{}};table._features.forEach((feature=>{var _feature$getInitialSt;initialState2=(_feature$getInitialSt=feature.getInitialState==null?void 0:feature.getInitialState(initialState2))!=null?_feature$getInitialSt:initialState2}));const queued=[];let queuedTimeout=false;const coreInstance={_features:features,options:{...defaultOptions2,...options},initialState:initialState2,_queue:cb=>{queued.push(cb);if(!queuedTimeout){queuedTimeout=true;Promise.resolve().then((()=>{while(queued.length){queued.shift()()}queuedTimeout=false})).catch((error=>setTimeout((()=>{throw error}))))}},reset:()=>{table.setState(table.initialState)},setOptions:updater=>{const newOptions=functionalUpdate(updater,table.options);table.options=mergeOptions(newOptions)},getState:()=>table.options.state,setState:updater=>{table.options.onStateChange==null?void 0:table.options.onStateChange(updater)},_getRowId:(row,index,parent)=>{var _table$options$getRow;return(_table$options$getRow=table.options.getRowId==null?void 0:table.options.getRowId(row,index,parent))!=null?_table$options$getRow:`${parent?[parent.id,index].join("."):index}`},getCoreRowModel:()=>{if(!table._getCoreRowModel){table._getCoreRowModel=table.options.getCoreRowModel(table)}return table._getCoreRowModel()},getRowModel:()=>table.getPaginationRowModel(),getRow:id=>{const row=table.getRowModel().rowsById[id];if(!row){throw new Error}return row},_getDefaultColumnDef:memo((()=>[table.options.defaultColumn]),(defaultColumn=>{var _defaultColumn;defaultColumn=(_defaultColumn=defaultColumn)!=null?_defaultColumn:{};return{header:props=>{const resolvedColumnDef=props.header.column.columnDef;if(resolvedColumnDef.accessorKey){return resolvedColumnDef.accessorKey}if(resolvedColumnDef.accessorFn){return resolvedColumnDef.id}return null},cell:props=>{var _props$renderValue$to,_props$renderValue;return(_props$renderValue$to=(_props$renderValue=props.renderValue())==null?void 0:_props$renderValue.toString==null?void 0:_props$renderValue.toString())!=null?_props$renderValue$to:null},...table._features.reduce(((obj,feature)=>Object.assign(obj,feature.getDefaultColumnDef==null?void 0:feature.getDefaultColumnDef())),{}),...defaultColumn}}),{debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugColumns},key:false}),_getColumnDefs:()=>table.options.columns,getAllColumns:memo((()=>[table._getColumnDefs()]),(columnDefs=>{const recurseColumns=function(columnDefs2,parent,depth){if(depth===void 0){depth=0}return columnDefs2.map((columnDef=>{const column=createColumn(table,columnDef,depth,parent);const groupingColumnDef=columnDef;column.columns=groupingColumnDef.columns?recurseColumns(groupingColumnDef.columns,column,depth+1):[];return column}))};return recurseColumns(columnDefs)}),{key:false,debug:()=>{var _table$options$debugA2;return(_table$options$debugA2=table.options.debugAll)!=null?_table$options$debugA2:table.options.debugColumns}}),getAllFlatColumns:memo((()=>[table.getAllColumns()]),(allColumns=>allColumns.flatMap((column=>column.getFlatColumns()))),{key:false,debug:()=>{var _table$options$debugA3;return(_table$options$debugA3=table.options.debugAll)!=null?_table$options$debugA3:table.options.debugColumns}}),_getAllFlatColumnsById:memo((()=>[table.getAllFlatColumns()]),(flatColumns=>flatColumns.reduce(((acc,column)=>{acc[column.id]=column;return acc}),{})),{key:false,debug:()=>{var _table$options$debugA4;return(_table$options$debugA4=table.options.debugAll)!=null?_table$options$debugA4:table.options.debugColumns}}),getAllLeafColumns:memo((()=>[table.getAllColumns(),table._getOrderColumnsFn()]),((allColumns,orderColumns2)=>{let leafColumns=allColumns.flatMap((column=>column.getLeafColumns()));return orderColumns2(leafColumns)}),{key:false,debug:()=>{var _table$options$debugA5;return(_table$options$debugA5=table.options.debugAll)!=null?_table$options$debugA5:table.options.debugColumns}}),getColumn:columnId=>{const column=table._getAllFlatColumnsById()[columnId];return column}};Object.assign(table,coreInstance);table._features.forEach((feature=>Object.assign(table,feature.createTable==null?void 0:feature.createTable(table))));return table}function createCell(table,row,column,columnId){const getRenderValue=()=>{var _cell$getValue;return(_cell$getValue=cell.getValue())!=null?_cell$getValue:table.options.renderFallbackValue};const cell={id:`${row.id}_${column.id}`,row:row,column:column,getValue:()=>row.getValue(columnId),renderValue:getRenderValue,getContext:memo((()=>[table,column,row,cell]),((table2,column2,row2,cell2)=>({table:table2,column:column2,row:row2,cell:cell2,getValue:cell2.getValue,renderValue:cell2.renderValue})),{key:false,debug:()=>table.options.debugAll})};table._features.forEach((feature=>{Object.assign(cell,feature.createCell==null?void 0:feature.createCell(cell,column,row,table))}),{});return cell}const createRow=(table,id,original,rowIndex,depth,subRows,parentId)=>{let row={id:id,index:rowIndex,original:original,depth:depth,parentId:parentId,_valuesCache:{},_uniqueValuesCache:{},getValue:columnId=>{if(row._valuesCache.hasOwnProperty(columnId)){return row._valuesCache[columnId]}const column=table.getColumn(columnId);if(!(column!=null&&column.accessorFn)){return void 0}row._valuesCache[columnId]=column.accessorFn(row.original,rowIndex);return row._valuesCache[columnId]},getUniqueValues:columnId=>{if(row._uniqueValuesCache.hasOwnProperty(columnId)){return row._uniqueValuesCache[columnId]}const column=table.getColumn(columnId);if(!(column!=null&&column.accessorFn)){return void 0}if(!column.columnDef.getUniqueValues){row._uniqueValuesCache[columnId]=[row.getValue(columnId)];return row._uniqueValuesCache[columnId]}row._uniqueValuesCache[columnId]=column.columnDef.getUniqueValues(row.original,rowIndex);return row._uniqueValuesCache[columnId]},renderValue:columnId=>{var _row$getValue;return(_row$getValue=row.getValue(columnId))!=null?_row$getValue:table.options.renderFallbackValue},subRows:[],getLeafRows:()=>flattenBy(row.subRows,(d=>d.subRows)),getParentRow:()=>row.parentId?table.getRow(row.parentId):void 0,getParentRows:()=>{let parentRows=[];let currentRow=row;while(true){const parentRow=currentRow.getParentRow();if(!parentRow)break;parentRows.push(parentRow);currentRow=parentRow}return parentRows.reverse()},getAllCells:memo((()=>[table.getAllLeafColumns()]),(leafColumns=>leafColumns.map((column=>createCell(table,row,column,column.id)))),{key:false,debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugRows}}),_getAllCellsByColumnId:memo((()=>[row.getAllCells()]),(allCells=>allCells.reduce(((acc,cell)=>{acc[cell.column.id]=cell;return acc}),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var _table$options$debugA2;return(_table$options$debugA2=table.options.debugAll)!=null?_table$options$debugA2:table.options.debugRows}})};for(let i=0;i<table._features.length;i++){const feature=table._features[i];Object.assign(row,feature==null?void 0:feature.createRow==null?void 0:feature.createRow(row,table))}return row};function createColumnHelper(){return{accessor:(accessor,column)=>typeof accessor==="function"?{...column,accessorFn:accessor}:{...column,accessorKey:accessor},display:column=>column,group:column=>column}}function getCoreRowModel(){return table=>memo((()=>[table.options.data]),(data=>{const rowModel={rows:[],flatRows:[],rowsById:{}};const accessRows=function(originalRows,depth,parentRow){if(depth===void 0){depth=0}const rows=[];for(let i=0;i<originalRows.length;i++){const row=createRow(table,table._getRowId(originalRows[i],i,parentRow),originalRows[i],i,depth,void 0,parentRow==null?void 0:parentRow.id);rowModel.flatRows.push(row);rowModel.rowsById[row.id]=row;rows.push(row);if(table.options.getSubRows){var _row$originalSubRows;row.originalSubRows=table.options.getSubRows(originalRows[i],i);if((_row$originalSubRows=row.originalSubRows)!=null&&_row$originalSubRows.length){row.subRows=accessRows(row.originalSubRows,depth+1,row)}}}return rows};rowModel.rows=accessRows(data);return rowModel}),{key:false,debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugTable},onChange:()=>{table._autoResetPageIndex()}})}function getSortedRowModel(){return table=>memo((()=>[table.getState().sorting,table.getPreSortedRowModel()]),((sorting,rowModel)=>{if(!rowModel.rows.length||!(sorting!=null&&sorting.length)){return rowModel}const sortingState=table.getState().sorting;const sortedFlatRows=[];const availableSorting=sortingState.filter((sort=>{var _table$getColumn;return(_table$getColumn=table.getColumn(sort.id))==null?void 0:_table$getColumn.getCanSort()}));const columnInfoById={};availableSorting.forEach((sortEntry=>{const column=table.getColumn(sortEntry.id);if(!column)return;columnInfoById[sortEntry.id]={sortUndefined:column.columnDef.sortUndefined,invertSorting:column.columnDef.invertSorting,sortingFn:column.getSortingFn()}}));const sortData=rows=>{const sortedData=[...rows];sortedData.sort(((rowA,rowB)=>{for(let i=0;i<availableSorting.length;i+=1){var _sortEntry$desc;const sortEntry=availableSorting[i];const columnInfo=columnInfoById[sortEntry.id];const isDesc=(_sortEntry$desc=sortEntry==null?void 0:sortEntry.desc)!=null?_sortEntry$desc:false;if(columnInfo.sortUndefined){const aValue=rowA.getValue(sortEntry.id);const bValue=rowB.getValue(sortEntry.id);const aUndefined=typeof aValue==="undefined";const bUndefined=typeof bValue==="undefined";if(aUndefined||bUndefined){let undefinedSort=aUndefined&&bUndefined?0:aUndefined?columnInfo.sortUndefined:-columnInfo.sortUndefined;if(isDesc&&undefinedSort!==0){undefinedSort*=-1}return undefinedSort}}let sortInt=columnInfo.sortingFn(rowA,rowB,sortEntry.id);if(sortInt!==0){if(isDesc){sortInt*=-1}if(columnInfo.invertSorting){sortInt*=-1}return sortInt}}return rowA.index-rowB.index}));sortedData.forEach((row=>{var _row$subRows;sortedFlatRows.push(row);if((_row$subRows=row.subRows)!=null&&_row$subRows.length){row.subRows=sortData(row.subRows)}}));return sortedData};return{rows:sortData(rowModel.rows),flatRows:sortedFlatRows,rowsById:rowModel.rowsById}}),{key:false,debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugTable},onChange:()=>{table._autoResetPageIndex()}})}function getExpandedRowModel(){return table=>memo((()=>[table.getState().expanded,table.getPreExpandedRowModel(),table.options.paginateExpandedRows]),((expanded,rowModel,paginateExpandedRows)=>{if(!rowModel.rows.length||expanded!==true&&!Object.keys(expanded!=null?expanded:{}).length){return rowModel}if(!paginateExpandedRows){return rowModel}return expandRows(rowModel)}),{key:false,debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugTable}})}function expandRows(rowModel){const expandedRows=[];const handleRow=row=>{var _row$subRows;expandedRows.push(row);if((_row$subRows=row.subRows)!=null&&_row$subRows.length&&row.getIsExpanded()){row.subRows.forEach(handleRow)}};rowModel.rows.forEach(handleRow);return{rows:expandedRows,flatRows:rowModel.flatRows,rowsById:rowModel.rowsById}}
|
12
|
+
/**
|
13
|
+
* react-table
|
14
|
+
*
|
15
|
+
* Copyright (c) TanStack
|
16
|
+
*
|
17
|
+
* This source code is licensed under the MIT license found in the
|
18
|
+
* LICENSE.md file in the root directory of this source tree.
|
19
|
+
*
|
20
|
+
* @license MIT
|
21
|
+
*/function flexRender(Comp,props){return!Comp?null:isReactComponent(Comp)?React.createElement(Comp,props):Comp}function isReactComponent(component){return isClassComponent(component)||typeof component==="function"||isExoticComponent(component)}function isClassComponent(component){return typeof component==="function"&&(()=>{const proto=Object.getPrototypeOf(component);return proto.prototype&&proto.prototype.isReactComponent})()}function isExoticComponent(component){return typeof component==="object"&&typeof component.$$typeof==="symbol"&&["react.memo","react.forward_ref"].includes(component.$$typeof.description)}function useReactTable(options){const resolvedOptions={state:{},onStateChange:()=>{},renderFallbackValue:null,...options};const[tableRef]=React.useState((()=>({current:createTable(resolvedOptions)})));const[state,setState]=React.useState((()=>tableRef.current.initialState));tableRef.current.setOptions((prev=>({...prev,...options,state:{...state,...options.state},onStateChange:updater=>{setState(updater);options.onStateChange==null?void 0:options.onStateChange(updater)}})));return tableRef.current}const TableHead=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="table"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_thead",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("thead",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})})};const TableHeader$1=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="table",text:text2}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_th",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("th",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children})})};const TableBody$1=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="table"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_tbody",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("tbody",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})})};const TableRow=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,sideHighlightColor:sideHighlightColor="none",tag:tag="table"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const sideHighlightClass=sideHighlightColor!=""?`side_highlight_${sideHighlightColor}`:null;const classes=classnames(buildCss("pb_table_row_kit",sideHighlightClass),"pb_table_tr",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("tr",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})})};const TableCell=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="table",text:text2}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_td",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("td",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children})})};const Table=props=>{const{aria:aria={},children:children,className:className,collapse:collapse="sm",container:container=true,dark:dark,data:data={},dataTable:dataTable=false,disableHover:disableHover=false,htmlOptions:htmlOptions={},id:id,outerPadding:outerPadding="",responsive:responsive="collapse",singleLine:singleLine=false,size:size="sm",sticky:sticky=false,striped:striped=false,tag:tag="table",verticalBorder:verticalBorder=false}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const tableCollapseCss=responsive!=="none"?`table-collapse-${collapse}`:"";const verticalBorderCss=verticalBorder?"vertical-border":"";const spaceCssName=outerPadding!=="none"?"space_":"";const outerPaddingCss=outerPadding?`outer_padding_${spaceCssName}${outerPadding}`:"";const isTableTag=tag==="table";const classNames=classnames("pb_table",`table-${size}`,`table-responsive-${responsive}`,{"table-card":container,"table-dark":dark,data_table:dataTable,"single-line":singleLine,"no-hover":disableHover,"sticky-header":sticky,striped:striped,[outerPaddingCss]:outerPadding!==""},globalProps(props),tableCollapseCss,verticalBorderCss,className);useEffect((()=>{const instance=new PbTable;instance.connect()}),[]);return jsx(Fragment,{children:isTableTag?jsx("table",{...ariaProps,...dataProps,...htmlProps,className:classNames,id:id,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classNames,id:id,children:children})})};Table.Head=TableHead;Table.Header=TableHeader$1;Table.Body=TableBody$1;Table.Row=TableRow;Table.Cell=TableCell;const AdvancedTableContext=createContext({});const filterExpandableRows=expandedState=>{for(const expandedRow in expandedState){if(expandedState[expandedRow]===false){delete expandedState[expandedRow]}}return expandedState};const updateExpandAndCollapseState=(tableRows,expanded,targetParent)=>{const updateExpandedRows={};const rows=tableRows.rows;let isExpansionConsistent=true;const areRowsExpanded=new Set;for(const row of rows){const shouldBeUpdated=targetParent===void 0?row.depth===0:targetParent===row.parentId;if(shouldBeUpdated){const isExpanded=row.getIsExpanded();areRowsExpanded.add(isExpanded);updateExpandedRows[row.id]=!isExpansionConsistent?true:!isExpanded;if(areRowsExpanded.size>1){isExpansionConsistent=false;for(const key in updateExpandedRows){updateExpandedRows[key]=true}}}}return filterExpandableRows({...expanded,...updateExpandedRows})};const CustomCell=({getValue:getValue,onRowToggleClick:onRowToggleClick,row:row,value:value})=>{const{setExpanded:setExpanded,expanded:expanded,expandedControl:expandedControl,inlineRowLoading:inlineRowLoading}=useContext(AdvancedTableContext);const handleOnExpand=row2=>{onRowToggleClick&&onRowToggleClick(row2);if(!expandedControl){setExpanded({...expanded,[row2.id]:!row2.getIsExpanded()})}};const RowHasChildren=row.original.children?true:false;const renderButton=inlineRowLoading?RowHasChildren:row.getCanExpand();return jsx("div",{style:{paddingLeft:`${row.depth*1.25}em`},children:jsxs(Flex,{alignItems:"center",columnGap:"xs",orientation:"row",children:[renderButton?jsx("button",{className:"gray-icon expand-toggle-icon",onClick:()=>handleOnExpand(row),children:row.getIsExpanded()?jsx(Icon,{cursor:"pointer",icon:"circle-play",rotation:90}):jsx(Icon,{cursor:"pointer",icon:"circle-play"})}):null,jsx(FlexItem,{paddingLeft:renderButton?"none":"xs",children:row.depth===0?getValue():value})]})})};const displayIcon=icon=>{if(typeof icon==="string"){return[icon,icon]}return icon};const SortIconButton=({header:header,sortIcon:sortIcon})=>jsx(Fragment,{children:header.column.getIsSorted()==="desc"?jsx("div",{className:"sort-button-icon",children:jsx(Icon,{icon:displayIcon(sortIcon)[0]})},displayIcon(sortIcon)[0]):jsx("div",{className:"sort-button-icon",children:jsx(Icon,{icon:displayIcon(sortIcon)[1]})},displayIcon(sortIcon)[1])});const ToggleIconButton=({row:row,onClick:onClick})=>{const{toggleExpansionIcon:toggleExpansionIcon}=useContext(AdvancedTableContext);return jsx("button",{className:"gray-icon toggle-all-icon",onClick:()=>onClick(row),children:jsx(Icon,{cursor:"pointer",fixedWidth:true,icon:displayIcon(toggleExpansionIcon)[0]})},displayIcon(toggleExpansionIcon)[0])};const isChrome=()=>{const userAgent=navigator.userAgent.toLowerCase();return userAgent.includes("chrome")&&!userAgent.includes("edg")};const TableHeaderCell=({enableSorting:enableSorting,enableToggleExpansion:enableToggleExpansion,handleExpandOrCollapse:handleExpandOrCollapse,header:header,headerChildren:headerChildren,isPinnedLeft:isPinnedLeft=false,loading:loading,sortIcon:sortIcon})=>{const{sortControl:sortControl,responsive:responsive}=useContext(AdvancedTableContext);const toggleSortButton=event=>{if(sortControl){const sortIsDesc=header.column.getIsSorted()==="desc";sortIsDesc?sortControl.onChange({desc:true}):sortControl.onChange({desc:false})}else{header.column.getToggleSortingHandler()(event)}};const cellClassName=classnames("table-header-cells",`${isChrome()?"chrome-styles":""}`,`${enableSorting?"table-header-cells-active":""}`,{"pinned-left":responsive==="scroll"&&isPinnedLeft});const cellId=`${loading?`loading-${header.id}`:`${header.id}`}`;const isToggleExpansionEnabledLoading=header.index===0&&loading&&(enableToggleExpansion==="all"||"header")&&enableToggleExpansion!=="none";const isToggleExpansionEnabled=header.index===0&&!loading&&(enableToggleExpansion==="all"||"header")&&enableToggleExpansion!=="none";return jsx("th",{align:"right",className:cellClassName,id:cellId,children:header.isPlaceholder?null:headerChildren&&header.index===0?jsxs(Flex,{alignItems:"center",children:[headerChildren,jsx("div",{children:flexRender(header.column.columnDef.header,header.getContext())})]}):jsxs(Flex,{alignItems:"center",justify:header.index===0&&enableSorting?"between":header.index===0&&!enableSorting?"start":"end",children:[isToggleExpansionEnabled&&jsx(ToggleIconButton,{onClick:handleExpandOrCollapse}),isToggleExpansionEnabledLoading&&jsx("div",{className:"loading-toggle-icon header-toggle-icon"}),jsxs(Flex,{className:`${header.index===0&&enableSorting&&"header-sort-button pb_th_link"}`,cursor:header.index===0&&enableSorting?"pointer":"default",...header.index===0&&enableSorting&&{htmlOptions:{onClick:event=>toggleSortButton(event),onKeyDown:event=>{if(event.key==="Enter"){toggleSortButton(event)}},tabIndex:0}},justify:header.index===0&&enableSorting?"between":"none",paddingLeft:enableSorting?"xxs":"xs",children:[jsx("div",{children:flexRender(header.column.columnDef.header,header.getContext())}),header.index===0&&header.column.getCanSort()&&enableSorting&&(loading?jsx("div",{className:"loading-toggle-icon"}):jsx(SortIconButton,{header:header,sortIcon:sortIcon}))]})]})},`${header.id}-header`)};const TableHeader=({children:children,className:className,dark:dark=false,enableSorting:enableSorting=false,id:id,sortIcon:sortIcon=["arrow-up-short-wide","arrow-down-short-wide"],...props})=>{const{enableToggleExpansion:enableToggleExpansion,handleExpandOrCollapse:handleExpandOrCollapse,loading:loading,table:table}=useContext(AdvancedTableContext);const classes=classnames(buildCss("pb_advanced_table_header"),globalProps(props),className);const columnPinning=table.getState().columnPinning;return jsx(Fragment,{children:jsx("thead",{className:classes,id:id,children:table.getHeaderGroups().map((headerGroup=>jsx("tr",{children:headerGroup.headers.map((header=>{const isPinnedLeft=columnPinning.left.includes(header.id);return jsx(TableHeaderCell,{enableSorting:enableSorting,enableToggleExpansion:enableToggleExpansion,handleExpandOrCollapse:handleExpandOrCollapse,header:header,headerChildren:children,isPinnedLeft:isPinnedLeft,loading:loading,sortIcon:sortIcon},`${header.id}-header`)}))},`${headerGroup.id}-headerGroup`)))})})};const LoadingInline=props=>{const{align:align="left",aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,text:text2=" Loading"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss(`pb_loading_inline_kit_${align}`),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsxs(Body$1,{color:"light",children:[jsx(Icon,{aria:{label:"loading icon"},fixedWidth:true,icon:"spinner",pulse:true}),text2]})})};const CollapsibleTrail=({leftOffset:leftOffset})=>{const style={position:"absolute",left:`${leftOffset}em`,top:0,bottom:0,width:"2px",backgroundColor:"#E4E8F0"};return jsx("div",{className:"collapsible-trail",style:style})};const renderCollapsibleTrail=currentDepth=>{const lines=[];for(let i=1;i<=currentDepth;i++){const additionalOffset=i>1?(i-1)*.25:0;const leftOffset=i*1+additionalOffset;lines.push(jsx(CollapsibleTrail,{leftOffset:leftOffset},i))}return lines};const SubRowHeaderRow=({collapsibleTrail:collapsibleTrail,enableToggleExpansion:enableToggleExpansion,onClick:onClick,row:row,subRowHeaders:subRowHeaders,table:table})=>{const{inlineRowLoading:inlineRowLoading}=useContext(AdvancedTableContext);const numberOfColumns=table.getAllFlatColumns().length;const rowHasChildren=row.original.children?true:false;const canExpand=inlineRowLoading?rowHasChildren:row.getCanExpand();return jsxs("tr",{className:"custom-row bg-silver",children:[jsxs("td",{className:`custom-row-first-column ${isChrome()?"chrome-styles":""}`,colSpan:1,children:[collapsibleTrail&&row.depth>0&&renderCollapsibleTrail(row.depth),jsx("div",{style:{paddingLeft:`${row.depth*1.25}em`},children:jsxs(Flex,{align:"center",columnGap:"xs",children:[enableToggleExpansion==="all"&&canExpand?jsx(ToggleIconButton,{onClick:onClick,row:row}):null,jsx(Caption,{marginLeft:canExpand?"none":"xs",text:subRowHeaders[row.depth-1]})]})})]}),jsx("td",{colSpan:numberOfColumns-1})]})};const LoadingCell=()=>jsx("div",{className:"loading-cell"});const TableBody=({className:className,collapsibleTrail:collapsibleTrail=true,dark:dark=false,id:id,subRowHeaders:subRowHeaders,...props})=>{const{columnDefinitions:columnDefinitions,enableToggleExpansion:enableToggleExpansion,handleExpandOrCollapse:handleExpandOrCollapse,isPinnedLeft:isPinnedLeft=false,inlineRowLoading:inlineRowLoading,loading:loading,responsive:responsive,table:table}=useContext(AdvancedTableContext);const classes=classnames(buildCss("pb_advanced_table_body"),{"pinned-left":responsive==="scroll"&&isPinnedLeft},globalProps(props),className);const columnPinning=table.getState().columnPinning;return jsx(Fragment,{children:jsx("tbody",{className:classes,id:id,children:table.getRowModel().rows.map((row=>{var _a;const isExpandable=row.getIsExpanded();const isFirstChildofSubrow=row.depth>0&&row.index===0;const rowHasNoChildren=row.original.children&&!row.original.children.length?true:false;const numberOfColumns=table.getAllFlatColumns().length;const isDataLoading=isExpandable&&(inlineRowLoading&&rowHasNoChildren)&&row.depth<((_a=columnDefinitions[0].cellAccessors)==null?void 0:_a.length);const rowBackground=isExpandable&&(!inlineRowLoading&&row.getCanExpand()||inlineRowLoading&&rowHasNoChildren);return jsxs(React__default.Fragment,{children:[isFirstChildofSubrow&&subRowHeaders&&jsx(SubRowHeaderRow,{collapsibleTrail:collapsibleTrail,enableToggleExpansion:enableToggleExpansion,onClick:handleExpandOrCollapse,row:row,subRowHeaders:subRowHeaders,table:table}),jsx("tr",{className:`${rowBackground?"bg-silver":"bg-white"} ${row.depth>0?`depth-sub-row-${row.depth}`:""}`,id:`${row.index}-${row.id}-${row.depth}-row`,children:row.getVisibleCells().map(((cell,i)=>{const isPinnedLeft2=columnPinning.left.includes(cell.column.id);return jsxs("td",{align:"right",className:classnames(`${cell.id}-cell position_relative`,isChrome()?"chrome-styles":"",isPinnedLeft2&&"pinned-left"),children:[collapsibleTrail&&i===0&&row.depth>0&&renderCollapsibleTrail(row.depth),jsx("span",{id:`${cell.id}-span`,children:loading?jsx(LoadingCell,{}):flexRender(cell.column.columnDef.cell,cell.getContext())})]},`${cell.id}-data`)}))}),isDataLoading?jsx("tr",{children:jsx("td",{colSpan:numberOfColumns,style:{paddingLeft:`${row.depth===0?.5:row.depth*2}em`},children:jsx(LoadingInline,{})})},`${row.id}-row`):null]},`${row.index}-${row.id}-${row.depth}-row`)}))})})};const AdvancedTable=props=>{const{aria:aria={},children:children,className:className,columnDefinitions:columnDefinitions,dark:dark=false,data:data={},enableToggleExpansion:enableToggleExpansion="header",expandedControl:expandedControl,htmlOptions:htmlOptions={},id:id,initialLoadingRowsCount:initialLoadingRowsCount=10,inlineRowLoading:inlineRowLoading=false,loading:loading,onRowToggleClick:onRowToggleClick,onToggleExpansionClick:onToggleExpansionClick,responsive:responsive="scroll",sortControl:sortControl,tableData:tableData,tableOptions:tableOptions,tableProps:tableProps,toggleExpansionIcon:toggleExpansionIcon="arrows-from-line"}=props;const[loadingStateRowCount,setLoadingStateRowCount]=useState(initialLoadingRowsCount);const[localExpanded,setLocalExpanded]=useState({});const expanded=expandedControl?expandedControl.value:localExpanded;const setExpanded=expandedControl?expandedControl.onChange:setLocalExpanded;const columnHelper=createColumnHelper();const createCellFunction=cellAccessors=>{const columnCells=({row:row,getValue:getValue})=>{const rowData=row.original;switch(row.depth){case 0:{return jsx(CustomCell,{getValue:getValue,onRowToggleClick:onRowToggleClick,row:row})}default:{const depthAccessor=cellAccessors[row.depth-1];const accessorValue=rowData[depthAccessor];return accessorValue?jsx(CustomCell,{onRowToggleClick:onRowToggleClick,row:row,value:accessorValue}):"N/A"}}};return columnCells};const columns=columnDefinitions&&columnDefinitions.map((column=>{const columnStructure={...columnHelper.accessor(column.accessor,{header:column.label})};if(column.cellAccessors){columnStructure.cell=createCellFunction(column.cellAccessors)}return columnStructure}));const sorting=[{id:columnDefinitions[0].accessor,desc:sortControl&&sortControl.value!==null?!sortControl.value.desc:false}];const expandAndSortState=()=>{if(sortControl){return{state:{expanded:expanded,sorting:sorting}}}else{return{state:{expanded:expanded}}}};const table=useReactTable({data:loading?Array(loadingStateRowCount).fill({}):tableData,columns:columns,onExpandedChange:setExpanded,getSubRows:row=>row.children,getCoreRowModel:getCoreRowModel(),getExpandedRowModel:getExpandedRowModel(),getSortedRowModel:getSortedRowModel(),enableSortingRemoval:false,sortDescFirst:true,...expandAndSortState(),...tableOptions});const tableRows=table.getRowModel();const updateLoadingStateRowCount=useCallback((()=>{const rowsCount=table.getRowModel().rows.length;if(rowsCount!==loadingStateRowCount&&rowsCount!==0){setLoadingStateRowCount(rowsCount)}}),[tableData,loadingStateRowCount]);useEffect((()=>{if(!loading){updateLoadingStateRowCount()}}),[loading,updateLoadingStateRowCount]);const handleExpandOrCollapse=async row=>{onToggleExpansionClick&&onToggleExpansionClick(row);const expandedState=expanded;const targetParent=row==null?void 0:row.parentId;const updatedRows=await updateExpandAndCollapseState(tableRows,expandedState,targetParent);setExpanded(updatedRows)};const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_advanced_table"),`table-responsive-${responsive}`,globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsx(AdvancedTableContext.Provider,{value:{columnDefinitions:columnDefinitions,enableToggleExpansion:enableToggleExpansion,expanded:expanded,expandedControl:expandedControl,handleExpandOrCollapse:handleExpandOrCollapse,inlineRowLoading:inlineRowLoading,loading:loading,responsive:responsive,setExpanded:setExpanded,sortControl:sortControl,table:table,toggleExpansionIcon:toggleExpansionIcon},children:jsx(Table,{className:`${loading?"content-loading":""}`,dark:dark,dataTable:true,numberSpacing:"tabular",responsive:"none",...tableProps,children:children?children:jsxs(Fragment,{children:[jsx(TableHeader,{}),jsx(TableBody,{})]})})})})};AdvancedTable.Header=TableHeader;AdvancedTable.Body=TableBody;const AvatarActionButton=props=>{const{action:action="add",aria:aria={},linkAriaLabel:linkAriaLabel,className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,imageAlt:imageAlt="",imageUrl:imageUrl,linkUrl:linkUrl,name:name,onClick:onClick,placement:placement="bottom left",size:size="md"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_avatar_action_button_kit",action,placement,size),globalProps(props),className);const icons={add:"plus-circle",remove:"times-circle"};return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsxs("a",{"aria-label":linkAriaLabel,href:linkUrl,onClick:onClick,children:[jsx(Avatar,{imageAlt:imageAlt,imageUrl:imageUrl,name:name,size:size}),jsx("div",{className:`icon ${dark?"dark":""}`,children:jsx(Icon,{dark:dark,icon:icons[action]})})]})})};const BreadCrumbItem=props=>{const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,component:component="a",...rest}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const Component=component||"span";const css=classnames(buildCss("pb_bread_crumb_item_kit"),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:css,id:id,children:jsx(Component,{className:"pb_bread_crumb_item",...domSafeProps(rest)})})};const BreadCrumbs=props=>{const{aria:aria={label:"Breadcrumb Navigation"},className:className,data:data={},htmlOptions:htmlOptions={},id:id,children:children}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const css=classnames(buildCss("pb_bread_crumbs_kit"),globalProps(props),className);return jsx("nav",{...ariaProps,...dataProps,...htmlProps,className:css,id:id,children:children})};const ButtonToolbar=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,orientation:orientation="horizontal",text:text2,variant:variant="primary"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_button_toolbar_kit",orientation,variant),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children||text2})};const contactTypeMap={cell:"mobile",email:"envelope",extension:"phone-plus",home:"phone",work:"phone-office","work-cell":"phone-laptop","wrong-phone":"phone-slash"};const formatContact=(contactString,contactType)=>{if(contactType==="email")return contactString;const cleaned=contactString.replace(/\D/g,"");const phoneNumber=cleaned.match(/^(1|)?(\d{3})(\d{3})(\d{4})$/);if(contactType==="extension"){return cleaned.match(/^\d{4}$/)}if(phoneNumber){const intlCode=phoneNumber[1]?"+1 ":"";return[intlCode,"(",phoneNumber[2],") ",phoneNumber[3],"-",phoneNumber[4]].join("")}return null};const Contact=props=>{const{aria:aria={},className:className,contactDetail:contactDetail,contactType:contactType,contactValue:contactValue,data:data={},dark:dark=false,htmlOptions:htmlOptions={},id:id}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_contact_kit"),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsxs(Body$1,{className:"pb_contact_kit",color:"light",dark:dark,tag:"span",children:[jsx(Icon,{dark:dark,fixedWidth:true,icon:contactTypeMap[contactType]||"phone"}),` ${formatContact(contactValue,contactType)} `,contactDetail&&jsx(Caption,{dark:dark,size:"xs",tag:"span",text:contactDetail})]})})};const sizes$1={lg:1,md:3,sm:4};const Currency=props=>{const{abbreviate:abbreviate=false,align:align="left",aria:aria={},amount:amount,data:data={},decimals:decimals="default",emphasized:emphasized=true,htmlOptions:htmlOptions={},id:id,unit:unit,className:className,label:label="",size:size="sm",symbol:symbol="$",variant:variant="default",dark:dark=false,unstyled:unstyled=false}=props;const emphasizedClass=emphasized?"":"_deemphasized";let variantClass;if(variant==="light"){variantClass="_light"}else if(variant==="bold"){variantClass="_bold"}const[whole,decimal="00"]=amount.split(".");const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_currency_kit",align,size),globalProps(props),className);const getFormattedNumber=input=>new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}).format(input);const getAbbreviatedValue=abbrType=>{const num=`${getFormattedNumber(whole.split(",").join(""))}`,isAmount=abbrType==="amount",isUnit=abbrType==="unit";return isAmount?num.slice(0,-1):isUnit?num.slice(-1):""};const getMatchingDecimalAmount=decimals==="matching"?amount:whole,getMatchingDecimalValue=decimals==="matching"?"":`.${decimal}`;const getAmount=abbreviate?getAbbreviatedValue("amount"):getMatchingDecimalAmount,getAbbreviation=abbreviate?getAbbreviatedValue("unit"):null,getDecimalValue=abbreviate?"":getMatchingDecimalValue;return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[jsx(Caption,{dark:dark,children:label}),jsx("div",{className:`pb_currency_wrapper${variantClass||emphasizedClass}`,children:unstyled?jsxs(Fragment,{children:[jsx("div",{children:symbol}),jsx("div",{children:getAmount}),jsxs("div",{children:[getAbbreviation,unit?unit:getDecimalValue]})]}):jsxs(Fragment,{children:[jsx(Body$1,{className:"dollar_sign",color:"light",dark:dark,children:symbol}),jsx(Title,{className:"pb_currency_value",dark:dark,size:sizes$1[size],children:getAmount}),jsxs(Body$1,{className:"unit",color:"light",dark:dark,children:[getAbbreviation,unit?unit:getDecimalValue]})]})})]})};const statusMap={increase:"positive",decrease:"negative",neutral:"neutral"};const iconMap$1={increase:"arrow-up",decrease:"arrow-down"};const StatChange=props=>{const{change:change="neutral",className:className,htmlOptions:htmlOptions={},icon:icon,id:id,value:value}=props;const status=statusMap[change];let returnedIcon=iconMap$1[change];if(icon){returnedIcon=icon}const htmlProps=buildHtmlProps(htmlOptions);return jsx(Fragment,{children:value&&jsx("div",{className:classnames(buildCss("pb_stat_change_kit",status),globalProps(props),className),id:id,...htmlProps,children:jsxs(Body$1,{status:status,children:[returnedIcon&&jsxs(Fragment,{children:[jsx(Icon,{fixed_width:true,icon:returnedIcon})," "]}),`${value}%`]})})})};const StatValue=props=>{const{className:className,htmlOptions:htmlOptions={},id:id,unit:unit,value:value=0}=props;const htmlProps=buildHtmlProps(htmlOptions);const displayValue=function(value2){if(value2||value2===0){return jsx(Title,{size:1,tag:"span",text:`${value2}`})}};const displayUnit=function(unit2){if(unit2){return jsx(Title,{size:3,tag:"span",text:unit2})}};return jsx("div",{className:classnames("pb_stat_value_kit",globalProps(props),className),id:id,...htmlProps,children:jsxs("div",{className:"pb_stat_value_wrapper",children:[displayValue(value)," ",displayUnit(unit)]})})};const DashboardValue=props=>{const{align:align="left",aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,statChange:statChange={},statLabel:statLabel,statValue:statValue={}}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_dashboard_value_kit",align),globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[statLabel&&jsx(Body$1,{color:"light",children:statLabel}),statValue&&jsx(StatValue,{unit:statValue.unit,value:statValue.value}),statChange&&jsx(StatChange,{change:statChange.change,value:statChange.value})]})};const PbDate=props=>{const{aria:aria={},alignment:alignment="left",className:className,data:data={},htmlOptions:htmlOptions={},id:id,showDayOfWeek:showDayOfWeek=false,showIcon:showIcon=false,size:size="md",unstyled:unstyled=false,value:value}=props;const weekday=DateTime$1.toWeekday(value);const month=DateTime$1.toMonth(value);const day=DateTime$1.toDay(value);const year=DateTime$1.toYear(value);const currentYear=(new Date).getFullYear();const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_date_kit",alignment),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:unstyled?jsxs(Fragment,{children:[showIcon&&jsx("div",{children:jsx(Icon,{fixedWidth:true,icon:"calendar-alt"})}),showDayOfWeek&&jsxs(Fragment,{children:[jsx("div",{children:weekday}),jsx("div",{children:"•"})]}),jsxs("span",{children:[jsxs("span",{children:[month," ",day]}),currentYear!=year&&jsx("span",{children:`, ${year}`})]})]}):size=="md"||size=="lg"?jsxs(Title,{size:4,tag:"h4",children:[showIcon&&jsx(Body$1,{className:"pb_icon_kit_container",color:"light",tag:"span",children:jsx(Icon,{fixedWidth:true,icon:"calendar-alt"})}),showDayOfWeek&&jsxs(Fragment,{children:[weekday,jsx(Body$1,{color:"light",tag:"span",text:" • "})]}),jsxs("span",{children:[month," ",day]}),currentYear!=year&&jsx("span",{children:`, ${year}`})]}):jsxs(Fragment,{children:[showIcon&&jsx(Caption,{className:"pb_icon_kit_container",tag:"span",children:jsx(Icon,{fixedWidth:true,icon:"calendar-alt",size:"sm"})}),showDayOfWeek&&jsxs(Fragment,{children:[jsx(Caption,{tag:"div",children:weekday}),jsx(Caption,{color:"light",tag:"div",text:" • "})]}),jsxs(Caption,{tag:"span",children:[month," ",day,currentYear!=year&&jsx(Fragment,{children:`, ${year}`})]})]})})};const DatePicker=props=>{if(props.plugins);const{allowInput:allowInput=false,aria:aria={},className:className,customQuickPickDates:customQuickPickDates,dark:dark=false,data:data={},defaultDate:defaultDate="",disableDate:disableDate=null,disableInput:disableInput,disableRange:disableRange=null,disableWeekdays:disableWeekdays=null,enableTime:enableTime=false,error:error,format:format="m/d/Y",hideIcon:hideIcon=false,hideLabel:hideLabel=false,htmlOptions:htmlOptions={},id:id,inLine:inLine=false,inputAria:inputAria={},inputData:inputData={},inputOnChange:inputOnChange,inputValue:inputValue,label:label="Date Picker",maxDate:maxDate,minDate:minDate,mode:mode="single",name:name,onChange:onChange=()=>{},onClose:onClose,pickerId:pickerId,placeholder:placeholder="Select Date",plugins:plugins=false,position:position,positionElement:positionElement,scrollContainer:scrollContainer,selectionType:selectionType="",showTimezone:showTimezone=false,staticPosition:staticPosition=true,thisRangesEndToday:thisRangesEndToday=false,yearRange:yearRange=[1900,2100]}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const inputAriaProps=buildAriaProps(inputAria);const inputDataProps=buildDataProps(inputData);useEffect((()=>{datePickerHelper({allowInput:allowInput,customQuickPickDates:customQuickPickDates,defaultDate:defaultDate,disableDate:disableDate,disableRange:disableRange,disableWeekdays:disableWeekdays,enableTime:enableTime,format:format,hideIcon:hideIcon,inLine:inLine,maxDate:maxDate,minDate:minDate,mode:mode,onChange:onChange,onClose:onClose,pickerId:pickerId,plugins:plugins,position:position,positionElement:positionElement,selectionType:selectionType,showTimezone:showTimezone,staticPosition:staticPosition,thisRangesEndToday:thisRangesEndToday,yearRange:yearRange,required:false},scrollContainer)}));const filteredProps={...props};if(filteredProps.marginBottom===void 0){filteredProps.marginBottom="sm"}filteredProps==null?true:delete filteredProps.position;const classes=classnames(buildCss("pb_date_picker_kit"),globalProps(filteredProps),error?"error":null,className);const iconWrapperClass=()=>{let base="cal_icon_wrapper";if(dark){base+=" dark"}if(hideLabel){base+=" no_label_shift"}if(error){base+=" error"}return base};return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsxs("div",{...inputAriaProps,...inputDataProps,className:"input_wrapper",children:[jsx(Caption,{className:"pb_date_picker_kit_label",text:hideLabel?null:label}),jsxs(Fragment,{children:[jsxs("div",{className:"date_picker_input_wrapper",children:[jsx("input",{autoComplete:"off",className:"date_picker_input",disabled:disableInput,id:pickerId,name:name,onChange:inputOnChange,placeholder:placeholder,value:inputValue}),error&&jsx(Body$1,{status:"negative",text:error,variant:null})]}),!hideIcon&&jsx("div",{className:iconWrapperClass(),id:`cal-icon-${pickerId}`,children:jsx(Icon,{className:"cal_icon",icon:"calendar-alt"})}),hideIcon&&inLine?jsxs("div",{children:[jsx("div",{className:iconWrapperClass(),id:`${pickerId}-icon-plus`,children:jsx(Icon,{className:"date-picker-plus-icon",icon:"plus"})}),jsx("div",{className:iconWrapperClass(),id:`${pickerId}-angle-down`,children:jsx(Icon,{className:"angle_down_icon",icon:"angle-down"})})]}):null]})]})})};const dateTimestamp$1=(dateValue,includeYear)=>{if(includeYear){return`${DateTime$1.toMonth(dateValue)} ${DateTime$1.toDay(dateValue)}, ${DateTime$1.toYear(dateValue)}`}else{return`${DateTime$1.toMonth(dateValue)} ${DateTime$1.toDay(dateValue)}`}};const dateTimeIso$1=dateValue=>DateTime$1.toIso(dateValue);const DateRangeInline=props=>{const{align:align="left",className:className,dark:dark=false,data:data={},endDate:endDate,htmlOptions:htmlOptions={},icon:icon=false,size:size="sm",startDate:startDate}=props;const dateInCurrentYear=()=>{const currentDate=new Date;return(startDate==null?void 0:startDate.getFullYear())===(endDate==null?void 0:endDate.getFullYear())&&(startDate==null?void 0:startDate.getFullYear())===currentDate.getFullYear()};const dateRangeClasses=buildCss("pb_date_range_inline_kit",align);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const renderTime=date=>jsx("time",{dateTime:dateTimeIso$1(date),children:dateInCurrentYear()?` ${dateTimestamp$1(date,false)} `:` ${dateTimestamp$1(date,true)} `});return jsx("div",{...dataProps,...htmlProps,className:classnames(dateRangeClasses,globalProps(props),className),children:jsxs("div",{className:"pb_date_range_inline_wrapper",children:[size==="xs"&&jsxs(Fragment,{children:[icon&&jsx(Caption,{dark:dark,tag:"span",children:jsx(Icon,{className:"pb_date_range_inline_icon",dark:dark,fixedWidth:true,icon:"calendar-alt",size:size,tag:"span"})}),jsx(Caption,{dark:dark,tag:"span",children:renderTime(startDate)}),jsx(Caption,{dark:dark,tag:"span",children:jsx(Icon,{className:"pb_date_range_inline_arrow",dark:dark,fixedWidth:true,icon:"long-arrow-right",tag:"span"})}),jsx(Caption,{dark:dark,tag:"span",children:renderTime(endDate)})]}),size==="sm"&&jsxs(Fragment,{children:[icon&&jsx(Body$1,{color:"light",dark:dark,tag:"span",children:jsx(Icon,{className:"pb_date_range_inline_icon",dark:dark,fixedWidth:true,icon:"calendar-alt",size:size,tag:"span"})}),jsx(Body$1,{dark:dark,tag:"span",children:renderTime(startDate)}),jsx(Body$1,{color:"light",dark:dark,tag:"span",children:jsx(Icon,{className:"pb_date_range_inline_arrow",dark:dark,fixedWidth:true,icon:"long-arrow-right",tag:"span"})}),jsx(Body$1,{dark:dark,tag:"span",children:renderTime(endDate)})]})]})})};const DateYearStacked=props=>{const{align:align="left",className:className,dark:dark=false,date:date,data:data={},htmlOptions:htmlOptions={}}=props;const css=classnames(buildCss("pb_date_year_stacked",align),globalProps(props),className);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);return jsxs("div",{...dataProps,...htmlProps,className:css,children:[jsx(Title,{dark:dark,size:4,text:`${DateTime$1.toDay(date)} ${DateTime$1.toMonth(date).toUpperCase()}`}),jsx(Body$1,{color:"light",children:DateTime$1.toYear(date)})]})};const DateRangeStacked=props=>{const{className:className,dark:dark=false,endDate:endDate,htmlOptions:htmlOptions={},startDate:startDate,data:data={}}=props;const css=classnames(buildCss("pb_date_range_stacked"),globalProps(props),className);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);return jsx("div",{...dataProps,...htmlProps,className:css,children:jsxs(Flex,{vertical:"center",children:[jsx(FlexItem,{children:jsx(DateYearStacked,{align:"right",dark:dark,date:startDate})}),jsx(FlexItem,{children:jsx("div",{children:jsx(Body$1,{color:"light",tag:"span",children:jsx(Icon,{className:"pb_date_range_stacked_arrow",fixedWidth:true,icon:"long-arrow-right"})})})}),jsx(FlexItem,{children:jsx(DateYearStacked,{dark:dark,date:endDate})})]})})};const sizes={sm:4,md:3};const DateStacked=props=>{const{align:align="left",bold:bold=false,reverse:reverse=false,className:className,dark:dark=false,date:date,data:data={},htmlOptions:htmlOptions={},size:size="sm"}=props;const classes=classnames(buildCss("pb_date_stacked_kit",align,size,{dark:dark,reverse:reverse}),globalProps(props),className);const currentYear=(new Date).getFullYear();const inputYear=DateTime$1.toYear(date);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);return jsx(Fragment,{children:bold==false?jsxs("div",{...dataProps,...htmlProps,className:classes,children:[jsxs("div",{className:"pb_date_stacked_day_month",children:[jsx(Caption,{text:DateTime$1.toMonth(date).toUpperCase()}),jsx(Title,{dark:dark,size:sizes[size],text:DateTime$1.toDay(date).toString()})]}),currentYear!=inputYear&&jsx(Caption,{size:"xs",children:inputYear})]}):jsx("div",{...dataProps,...htmlProps,className:classes,children:jsxs("div",{className:"pb_date_stacked_day_month",children:[jsx(Title,{bold:true,dark:dark,size:"4",text:DateTime$1.toMonth(date)}),jsx(Title,{bold:true,dark:dark,size:"4",text:DateTime$1.toDay(date).toString()}),currentYear!=inputYear&&jsx(Title,{size:"4",children:inputYear})]})})})};const Time=props=>{const{align:align,className:className,date:date,htmlOptions:htmlOptions={},showIcon:showIcon,size:size,timeZone:timeZone,unstyled:unstyled=false,showTimezone:showTimezone=true}=props;const classes=classnames(buildCss("pb_time_kit",align,size),globalProps(props),className);const htmlProps=buildHtmlProps(htmlOptions);return jsxs("div",{...htmlProps,className:classes,children:[showIcon&&(unstyled?jsxs("span",{children:[jsx(Icon,{fixedWidth:true,icon:"clock"})," "]}):jsx(Fragment,{children:jsxs(Body$1,{color:"light",tag:"span",children:[jsx(Icon,{fixedWidth:true,icon:"clock",size:size==="md"?"":"sm"})," "]})})),jsx("time",{dateTime:date.toLocaleString(),children:jsx("span",{children:unstyled?jsxs(Fragment,{children:[jsx("span",{children:DateTime$1.toTimeWithMeridiem(date,timeZone)})," ",showTimezone&&jsx("span",{children:DateTime$1.toTimeZone(date,timeZone)})]}):size==="md"?jsxs(Fragment,{children:[jsx(Body$1,{className:"pb_time",tag:"span",text:DateTime$1.toTimeWithMeridiem(date,timeZone)})," ",showTimezone&&jsx(Body$1,{color:"light",tag:"span",text:DateTime$1.toTimeZone(date,timeZone)})]}):jsxs(Fragment,{children:[jsx(Caption,{color:"light",tag:"span",text:DateTime$1.toTimeWithMeridiem(date,timeZone)})," ",showTimezone&&jsx(Caption,{color:"light",tag:"span",text:DateTime$1.toTimeZone(date,timeZone)})]})})})]})};const DateTime=props=>{const{align:align="left",aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},showDayOfWeek:showDayOfWeek=false,datetime:datetime2,id:id,showIcon:showIcon=false,size:size="md",timeZone:timeZone="America/New_York"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_date_time",size),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsxs(Flex,{horizontal:align,vertical:"baseline",children:[jsx(PbDate,{showDayOfWeek:showDayOfWeek,size:size,value:datetime2}),jsx(Time,{date:datetime2,marginLeft:"sm",showIcon:showIcon,size:size,timeZone:timeZone})]})})};const TimeStackedDefault=props=>{if(props.date);const{align:align="left",className:className,dark:dark,data:data={},date:date,htmlOptions:htmlOptions={},time:time,timeZone:timeZone}=props;const classes=classnames(buildCss("pb_time_stacked_kit",align),globalProps(props),className);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);return jsx("div",{className:classes,...dataProps,...htmlProps,children:jsx(Body$1,{className:classnames("pb_time_stacked","time-spacing"),color:"light",dark:dark,children:jsxs("time",{children:[DateTime$1.toTimeWithMeridiem(date?date:new Date(time),timeZone),jsx(Caption,{className:"pb_time_stacked",color:"light",dark:dark,tag:"span",text:DateTime$1.toTimeZone(date?date:new Date(time),timeZone)})]})})})};const DateTimeStacked=props=>{if(props.date);const{date:date,datetime:datetime2,dark:dark,htmlOptions:htmlOptions={},timeZone:timeZone="America/New_York"}=props;const classes=buildCss("pb_date_time_stacked_kit",globalProps(props));const htmlProps=buildHtmlProps(htmlOptions);return jsxs(Flex,{inline:false,vertical:"stretch",...htmlProps,...props,children:[jsx(FlexItem,{children:jsx(DateStacked,{align:"right",bold:true,dark:dark,date:date||datetime2})}),jsx(SectionSeparator,{className:"date-time-padding",orientation:"vertical"}),jsx(FlexItem,{children:jsx(TimeStackedDefault,{className:classes,dark:dark,date:date||datetime2,timeZone:timeZone})})]})};const Detail=props=>{const{aria:aria={},bold:bold=false,children:children,className:className,color:color="light",data:data={},htmlOptions:htmlOptions={},id:id="",tag:tag="div",text:text2=""}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const isBold=bold?"bold":null;const classes=classnames(buildCss("pb_detail_kit",`color`,color),isBold,globalProps(props),className);const Tag=`${tag}`;return jsx(Tag,{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children})};const DropdownContext=createContext({});const List=props=>{const{aria:aria={},borderless:borderless=false,children:children,className:className,dark:dark=false,data:data={},enableDrag:enableDrag=false,htmlOptions:htmlOptions={},id:id,layout:layout="",ordered:ordered=false,role:role,size:size="",tabIndex:tabIndex,xpadding:xpadding=false,variant:variant,text:text2}=props;const layoutClass={left:"layout_left",right:"layout_right",default:""};const childrenWithProps=React__default.Children.map(children,(child=>React__default.cloneElement(child,{text:text2,variant:variant,enableDrag:enableDrag})));const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_list_kit",layoutClass[layout],size,{dark:dark,borderless:borderless,ordered:ordered,xpadding:xpadding}),globalProps(props),className);return jsx(Fragment,{children:enableDrag?jsx(Draggable.Container,{children:jsx("div",Object.assign({className:classes},{children:ordered?jsx("ol",Object.assign({},ariaProps,dataProps,htmlProps,{className:className,id:id,role:role,tabIndex:tabIndex},{children:childrenWithProps}),void 0):jsx("ul",Object.assign({},ariaProps,dataProps,htmlProps,{className:className,id:id,role:role,tabIndex:tabIndex},{children:childrenWithProps}),void 0)}),void 0)},void 0):jsx("div",Object.assign({className:classes},{children:ordered?jsx("ol",Object.assign({},ariaProps,dataProps,htmlProps,{className:className,id:id,role:role,tabIndex:tabIndex},{children:childrenWithProps}),void 0):jsx("ul",Object.assign({},ariaProps,dataProps,htmlProps,{className:className,id:id,role:role,tabIndex:tabIndex},{children:childrenWithProps}),void 0)}),void 0)},void 0)};const ListItem=props=>{const{aria:aria={},children:children,className:className,data:data={},enableDrag:enableDrag,dragId:dragId,dragHandle:dragHandle=true,htmlOptions:htmlOptions={},id:id,tabIndex:tabIndex}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_item_kit"),globalProps(props),className);return jsx(Fragment,{children:enableDrag?jsx(Draggable.Item,Object.assign({dragId:dragId},{children:jsxs("li",Object.assign({},ariaProps,dataProps,htmlProps,{className:classes,id:id,tabIndex:tabIndex},{children:[dragHandle&&jsx("span",Object.assign({style:{verticalAlign:"middle"}},{children:jsx(Body$1,Object.assign({color:"light"},{children:jsx(Icon,{icon:"grip-dots-vertical",verticalAlign:"middle"},void 0)}),void 0)}),void 0),children]}),void 0)}),void 0):jsx("li",Object.assign({},ariaProps,dataProps,htmlProps,{className:classes,id:id,tabIndex:tabIndex},{children:children}),void 0)},void 0)};const DropdownContainer=props=>{const{aria:aria={},children:children,className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,searchbar:searchbar=false}=props;const{dropdownContainerRef:dropdownContainerRef,filteredOptions:filteredOptions,filterItem:filterItem,handleChange:handleChange,inputRef:inputRef,isDropDownClosed:isDropDownClosed,setFocusedOptionIndex:setFocusedOptionIndex,triggerRef:triggerRef}=useContext(DropdownContext);const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_dropdown_container"),`${isDropDownClosed?"close":"open"}`,globalProps(props),className);return jsxs("div",Object.assign({},ariaProps,dataProps,htmlProps,{className:classes,id:id,onMouseEnter:()=>setFocusedOptionIndex(-1),ref:dropdownContainerRef,style:triggerRef?{}:{position:"absolute"}},{children:[searchbar&&jsx(TextInput,Object.assign({dark:dark,paddingTop:"xs",paddingX:"xs"},{children:jsx("input",{onChange:handleChange,placeholder:"Select...",ref:inputRef,value:filterItem},void 0)}),void 0),jsx(List,Object.assign({dark:dark},{children:(filteredOptions===null||filteredOptions===void 0?void 0:filteredOptions.length)===0?jsx(ListItem,Object.assign({dark:dark,display:"flex",justifyContent:"center",padding:"xs"},{children:jsx(Body$1,{color:"light",dark:dark,text:"no option"},void 0)}),void 0):children}),void 0)]}),void 0)};const DropdownOption=props=>{const{aria:aria={},children:children,className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,key:key,option:option}=props;const{filteredOptions:filteredOptions,filterItem:filterItem,focusedOptionIndex:focusedOptionIndex,handleOptionClick:handleOptionClick,selected:selected}=useContext(DropdownContext);const isItemMatchingFilter=option2=>{const label=typeof option2.label==="string"?option2.label.toLowerCase():option2.label;return String(label).toLowerCase().includes(filterItem.toLowerCase())};if(!isItemMatchingFilter(option)){return null}const isFocused=focusedOptionIndex>=0&&filteredOptions[focusedOptionIndex].label===option.label;const focusedClass=isFocused&&"focused";const selectedClass=`${selected.label===option.label?"selected":"list"}`;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_dropdown_option",selectedClass,focusedClass),globalProps(props),className);return createElement("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,key:key,onClick:()=>handleOptionClick(option)},jsx(ListItem,{cursor:"pointer",dark:dark,"data-name":option.value,padding:"none",children:children?jsx("div",{className:"dropdown_option_wrapper",children:children}):jsx(Body$1,{dark:dark,text:option.label})},option.label))};const useHandleOnKeyDown=()=>{const{autocomplete:autocomplete,filteredOptions:filteredOptions,focusedOptionIndex:focusedOptionIndex,handleBackspace:handleBackspace,handleOptionClick:handleOptionClick,selected:selected,setFocusedOptionIndex:setFocusedOptionIndex,setIsDropDownClosed:setIsDropDownClosed}=useContext(DropdownContext);return e=>{if(e.key!=="Tab"&&autocomplete&&selected&&selected.label){handleBackspace()}switch(e.key){case"Backspace":case"Delete":if(autocomplete){handleBackspace()}break;case"ArrowDown":{e.preventDefault();setIsDropDownClosed(false);const nextIndex=(focusedOptionIndex+1)%filteredOptions.length;setFocusedOptionIndex(nextIndex);break}case"ArrowUp":{e.preventDefault();const nextIndexUp=(focusedOptionIndex-1+filteredOptions.length)%filteredOptions.length;setFocusedOptionIndex(nextIndexUp);break}case"Enter":if(focusedOptionIndex!==-1){e.preventDefault();handleOptionClick(filteredOptions[focusedOptionIndex]);setFocusedOptionIndex(-1)}else if(focusedOptionIndex===-1){setIsDropDownClosed(false)}break;case"Tab":setIsDropDownClosed(true);setFocusedOptionIndex(-1);break}}};const DropdownTrigger=props=>{const{aria:aria={},children:children,className:className,customDisplay:customDisplay,dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,placeholder:placeholder}=props;const{autocomplete:autocomplete,filterItem:filterItem,handleChange:handleChange,handleWrapperClick:handleWrapperClick,inputRef:inputRef,inputWrapperRef:inputWrapperRef,isDropDownClosed:isDropDownClosed,isInputFocused:isInputFocused,selected:selected,setIsInputFocused:setIsInputFocused,toggleDropdown:toggleDropdown,triggerRef:triggerRef}=useContext(DropdownContext);const handleKeyDown=useHandleOnKeyDown();const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_dropdown_trigger"),globalProps(props),className);const triggerWrapperClasses=buildCss("dropdown_trigger_wrapper",isInputFocused&&"focus",!autocomplete&&"select_only");const customDisplayPlaceholder=selected.label?jsx("b",{children:selected.label},void 0):autocomplete?"":placeholder?placeholder:"Select...";const defaultDisplayPlaceholder=selected.label?selected.label:autocomplete?"":placeholder?placeholder:"Select...";return jsx("div",Object.assign({},ariaProps,dataProps,htmlProps,{className:classes,id:id},{children:!triggerRef&&(children?jsx("div",Object.assign({onClick:()=>toggleDropdown(),onKeyDown:handleKeyDown,ref:inputWrapperRef,style:{display:"inline-block"},tabIndex:0},{children:children}),void 0):jsx(Fragment,{children:jsxs(Flex,Object.assign({align:"center",borderRadius:"lg",className:triggerWrapperClasses,cursor:`${autocomplete?"text":"pointer"}`,htmlOptions:{onClick:()=>handleWrapperClick(),onKeyDown:handleKeyDown,tabIndex:"0",ref:inputWrapperRef},justify:"between",paddingX:"sm",paddingY:"xs"},{children:[jsx(FlexItem,{children:jsxs(Flex,Object.assign({align:"center"},{children:[customDisplay?jsxs(Flex,Object.assign({align:"center"},{children:[customDisplay,jsx(Body$1,Object.assign({dark:dark,paddingLeft:`${selected.label?"xs":"none"}`},{children:customDisplayPlaceholder}),void 0)]}),void 0):jsx(Body$1,{dark:dark,text:defaultDisplayPlaceholder},void 0),autocomplete&&jsx("input",{className:"dropdown_input",onChange:handleChange,onClick:()=>toggleDropdown(),onFocus:()=>setIsInputFocused(true),onKeyDown:handleKeyDown,placeholder:selected.label?"":placeholder?placeholder:"Select...",ref:inputRef,value:filterItem},void 0)]}),void 0)},void 0),jsx(Body$1,Object.assign({dark:dark,display:"flex",htmlOptions:{onClick:e=>{e.stopPropagation();handleWrapperClick()}}},{children:jsx(Icon,{cursor:"pointer",dark:dark,icon:`${isDropDownClosed?"chevron-down":"chevron-up"}`,size:"sm"},void 0)}),`${isDropDownClosed?"chevron-down":"chevron-up"}`)]}),void 0)},void 0))}),void 0)};const separateChildComponents=children=>{let trigger=null;let container=null;const otherChildren=[];React__default.Children.forEach(children,(child=>{if(child&&child.type===DropdownTrigger){trigger=child}else if(child&&child.type===DropdownContainer){container=child}else{otherChildren.push(child)}}));return{trigger:trigger,container:container,otherChildren:otherChildren}};const prepareSubcomponents=({children:children,hasTriggerSubcomponent:hasTriggerSubcomponent,hasContainerSubcomponent:hasContainerSubcomponent,trigger:trigger,container:container,otherChildren:otherChildren,dark:dark})=>{const componentsToRender=[];if(!hasTriggerSubcomponent&&!hasContainerSubcomponent){componentsToRender.push(jsx(DropdownTrigger,{dark:dark},void 0));componentsToRender.push(jsx(DropdownContainer,Object.assign({dark:dark},{children:children}),void 0))}else if(!hasTriggerSubcomponent&&hasContainerSubcomponent){componentsToRender.push(jsx(DropdownTrigger,{dark:dark},void 0));componentsToRender.push(children)}else if(hasTriggerSubcomponent&&!hasContainerSubcomponent){componentsToRender.push(trigger);componentsToRender.push(jsx(DropdownContainer,Object.assign({dark:dark},{children:otherChildren}),void 0))}else{componentsToRender.push(trigger);componentsToRender.push(container)}return componentsToRender};const handleClickOutside=({inputWrapperRef:inputWrapperRef,dropdownContainerRef:dropdownContainerRef,setIsDropDownClosed:setIsDropDownClosed,setFocusedOptionIndex:setFocusedOptionIndex,setIsInputFocused:setIsInputFocused})=>e=>{let targetElement=e.target;let shouldClose=true;while(targetElement&&shouldClose){if(targetElement.getAttribute("data-dropdown")==="pb-dropdown-trigger"){shouldClose=false}targetElement=targetElement.parentElement}if(inputWrapperRef.current&&!inputWrapperRef.current.contains(e.target)&&dropdownContainerRef.current&&!dropdownContainerRef.current.contains(e.target)&&shouldClose){setIsDropDownClosed(true);setFocusedOptionIndex(-1);setIsInputFocused(false)}};const Dropdown=props=>{const{aria:aria={},autocomplete:autocomplete=false,blankSelection:blankSelection="",children:children,className:className,dark:dark=false,data:data={},defaultValue:defaultValue={},error:error,htmlOptions:htmlOptions={},id:id,isClosed:isClosed=true,label:label,onSelect:onSelect,options:options,triggerRef:triggerRef}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_dropdown"),globalProps(props),className);const[isDropDownClosed,setIsDropDownClosed,toggleDropdown]=useDropdown(isClosed);const[filterItem,setFilterItem]=useState("");const[selected,setSelected]=useState(defaultValue);const[isInputFocused,setIsInputFocused]=useState(false);const[hasTriggerSubcomponent,setHasTriggerSubcomponent]=useState(true);const[hasContainerSubcomponent,setHasContainerSubcomponent]=useState(true);const[focusedOptionIndex,setFocusedOptionIndex]=useState(-1);const dropdownRef=useRef(null);const inputRef=useRef(null);const inputWrapperRef=useRef(null);const dropdownContainerRef=useRef(null);const{trigger:trigger,container:container,otherChildren:otherChildren}=separateChildComponents(children);useEffect((()=>{if(triggerRef==null?void 0:triggerRef.current){const parentElement=triggerRef.current.parentNode;if(parentElement){parentElement.style.position="relative"}}const handleClick=handleClickOutside({inputWrapperRef:inputWrapperRef,dropdownContainerRef:dropdownContainerRef,setIsDropDownClosed:setIsDropDownClosed,setFocusedOptionIndex:setFocusedOptionIndex,setIsInputFocused:setIsInputFocused});window.addEventListener("click",handleClick);return()=>{window.removeEventListener("click",handleClick)}}),[]);useEffect((()=>{setHasTriggerSubcomponent(!!trigger);setHasContainerSubcomponent(!!container)}),[]);useEffect((()=>{setIsDropDownClosed(isClosed)}),[isClosed]);const blankSelectionOption=blankSelection?[{label:blankSelection,value:""}]:[];const optionsWithBlankSelection=blankSelectionOption.concat(options);const filteredOptions=optionsWithBlankSelection==null?void 0:optionsWithBlankSelection.filter((option=>{const label2=typeof option.label==="string"?option.label.toLowerCase():option.label;return String(label2).toLowerCase().includes(filterItem.toLowerCase())}));useEffect((()=>{if(!isDropDownClosed){let newIndex=0;if(selected&&(selected==null?void 0:selected.label)){const selectedIndex=filteredOptions.findIndex((option=>option.label===selected.label));if(selectedIndex>=0){newIndex=selectedIndex}}setFocusedOptionIndex(newIndex)}}),[isDropDownClosed]);const handleChange=e=>{setFilterItem(e.target.value);setIsDropDownClosed(false)};const handleOptionClick=selectedItem=>{setSelected(selectedItem);setFilterItem("");setIsDropDownClosed(true);onSelect&&onSelect(selectedItem)};const handleWrapperClick=()=>{autocomplete&&inputRef.current.focus();toggleDropdown()};const handleBackspace=()=>{setSelected({});onSelect&&onSelect(null);setFocusedOptionIndex(-1)};const componentsToRender=prepareSubcomponents({children:children,hasTriggerSubcomponent:hasTriggerSubcomponent,hasContainerSubcomponent:hasContainerSubcomponent,trigger:trigger,container:container,otherChildren:otherChildren,dark:dark});return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,style:triggerRef?{position:"absolute"}:{position:"relative"},children:jsxs(DropdownContext.Provider,{value:{autocomplete:autocomplete,dropdownContainerRef:dropdownContainerRef,filteredOptions:filteredOptions,filterItem:filterItem,focusedOptionIndex:focusedOptionIndex,handleBackspace:handleBackspace,handleChange:handleChange,handleOptionClick:handleOptionClick,handleWrapperClick:handleWrapperClick,inputRef:inputRef,inputWrapperRef:inputWrapperRef,isDropDownClosed:isDropDownClosed,isInputFocused:isInputFocused,optionsWithBlankSelection:optionsWithBlankSelection,selected:selected,setFocusedOptionIndex:setFocusedOptionIndex,setIsDropDownClosed:setIsDropDownClosed,setIsInputFocused:setIsInputFocused,setSelected:setSelected,toggleDropdown:toggleDropdown,triggerRef:triggerRef},children:[label&&jsx(Caption,{dark:dark,marginBottom:"xs",text:label}),jsxs("div",{className:`dropdown_wrapper ${error?"error":""}`,onBlur:()=>{setTimeout((()=>{if(!dropdownRef.current.contains(document.activeElement)){setIsInputFocused(false)}}),0)},onFocus:()=>setIsInputFocused(true),ref:dropdownRef,children:[children?jsx(Fragment,{children:componentsToRender.map(((component,index)=>jsx(React__default.Fragment,{children:component},index)))}):jsxs(Fragment,{children:[jsx(DropdownTrigger,{}),jsx(DropdownContainer,{children:optionsWithBlankSelection&&(optionsWithBlankSelection==null?void 0:optionsWithBlankSelection.map((option=>jsx(Dropdown.Option,{option:option},option.id))))})]}),error&&jsx(Body$1,{status:"negative",text:error})]})]})})};Dropdown.Option=DropdownOption;Dropdown.Trigger=DropdownTrigger;Dropdown.Container=DropdownContainer;function __awaiter(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,[])).next())}))}function __generator(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw new TypeError("Generator is already executing.");while(g&&(g=0,op[0]&&(_=0)),_)try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[op[0]&2,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(op[0]===6&&_.label<t[1]){_.label=t[1];t=op;break}if(t&&_.label<t[2]){_.label=t[2];_.ops.push(op);break}if(t[2])_.ops.pop();_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e];y=0}finally{f=t=0}if(op[0]&5)throw op[1];return{value:op[0]?op[1]:void 0,done:true}}}function __read(o,n){var m=typeof Symbol==="function"&&o[Symbol.iterator];if(!m)return o;var i=m.call(o),r,ar=[],e;try{while((n===void 0||n-- >0)&&!(r=i.next()).done)ar.push(r.value)}catch(error){e={error:error}}finally{try{if(r&&!r.done&&(m=i["return"]))m.call(i)}finally{if(e)throw e.error}}return ar}function __spread(){for(var ar=[],i=0;i<arguments.length;i++)ar=ar.concat(__read(arguments[i]));return ar}var COMMON_MIME_TYPES=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]);function toFileWithPath(file,path){var f=withMimeType(file);if(typeof f.path!=="string"){var webkitRelativePath=file.webkitRelativePath;Object.defineProperty(f,"path",{value:typeof path==="string"?path:typeof webkitRelativePath==="string"&&webkitRelativePath.length>0?webkitRelativePath:file.name,writable:false,configurable:false,enumerable:true})}return f}function withMimeType(file){var name=file.name;var hasExtension=name&&name.lastIndexOf(".")!==-1;if(hasExtension&&!file.type){var ext=name.split(".").pop().toLowerCase();var type=COMMON_MIME_TYPES.get(ext);if(type){Object.defineProperty(file,"type",{value:type,writable:false,configurable:false,enumerable:true})}}return file}var FILES_TO_IGNORE=[".DS_Store","Thumbs.db"];function fromEvent(evt){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(_a){return[2,isDragEvt(evt)&&evt.dataTransfer?getDataTransferFiles(evt.dataTransfer,evt.type):getInputFiles(evt)]}))}))}function isDragEvt(value){return!!value.dataTransfer}function getInputFiles(evt){var files=isInput(evt.target)?evt.target.files?fromList(evt.target.files):[]:[];return files.map((function(file){return toFileWithPath(file)}))}function isInput(value){return value!==null}function getDataTransferFiles(dt,type){return __awaiter(this,void 0,void 0,(function(){var items,files;return __generator(this,(function(_a){switch(_a.label){case 0:if(!dt.items)return[3,2];items=fromList(dt.items).filter((function(item){return item.kind==="file"}));if(type!=="drop"){return[2,items]}return[4,Promise.all(items.map(toFilePromises))];case 1:files=_a.sent();return[2,noIgnoredFiles(flatten(files))];case 2:return[2,noIgnoredFiles(fromList(dt.files).map((function(file){return toFileWithPath(file)})))]}}))}))}function noIgnoredFiles(files){return files.filter((function(file){return FILES_TO_IGNORE.indexOf(file.name)===-1}))}function fromList(items){var files=[];for(var i=0;i<items.length;i++){var file=items[i];files.push(file)}return files}function toFilePromises(item){if(typeof item.webkitGetAsEntry!=="function"){return fromDataTransferItem(item)}var entry=item.webkitGetAsEntry();if(entry&&entry.isDirectory){return fromDirEntry(entry)}return fromDataTransferItem(item)}function flatten(items){return items.reduce((function(acc,files){return __spread(acc,Array.isArray(files)?flatten(files):[files])}),[])}function fromDataTransferItem(item){var file=item.getAsFile();if(!file){return Promise.reject(item+" is not a File")}var fwp=toFileWithPath(file);return Promise.resolve(fwp)}function fromEntry(entry){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(_a){return[2,entry.isDirectory?fromDirEntry(entry):fromFileEntry(entry)]}))}))}function fromDirEntry(entry){var reader=entry.createReader();return new Promise((function(resolve,reject){var entries=[];function readEntries(){var _this=this;reader.readEntries((function(batch){return __awaiter(_this,void 0,void 0,(function(){var files,err_1,items;return __generator(this,(function(_a){switch(_a.label){case 0:if(!!batch.length)return[3,5];_a.label=1;case 1:_a.trys.push([1,3,,4]);return[4,Promise.all(entries)];case 2:files=_a.sent();resolve(files);return[3,4];case 3:err_1=_a.sent();reject(err_1);return[3,4];case 4:return[3,6];case 5:items=Promise.all(batch.map(fromEntry));entries.push(items);readEntries();_a.label=6;case 6:return[2]}}))}))}),(function(err){reject(err)}))}readEntries()}))}function fromFileEntry(entry){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(_a){return[2,new Promise((function(resolve,reject){entry.file((function(file){var fwp=toFileWithPath(file,entry.fullPath);resolve(fwp)}),(function(err){reject(err)}))}))]}))}))}var _default=function(file,acceptedFiles){if(file&&acceptedFiles){var acceptedFilesArray=Array.isArray(acceptedFiles)?acceptedFiles:acceptedFiles.split(",");var fileName=file.name||"";var mimeType=(file.type||"").toLowerCase();var baseMimeType=mimeType.replace(/\/.*$/,"");return acceptedFilesArray.some((function(type){var validType=type.trim().toLowerCase();if(validType.charAt(0)==="."){return fileName.toLowerCase().endsWith(validType)}else if(validType.endsWith("/*")){return baseMimeType===validType.replace(/\/.*$/,"")}return mimeType===validType}))}return true};function fileAccepted(file,accept){return file.type==="application/x-moz-file"||_default(file,accept)}function fileMatchSize(file,minSize,maxSize){if(isDefined(file.size)){if(isDefined(minSize)&&isDefined(maxSize))return file.size>=minSize&&file.size<=maxSize;else if(isDefined(minSize))return file.size>=minSize;else if(isDefined(maxSize))return file.size<=maxSize}return true}function isDefined(value){return value!==void 0&&value!==null}function allFilesAccepted(_ref){var files=_ref.files,accept=_ref.accept,minSize=_ref.minSize,maxSize=_ref.maxSize,multiple=_ref.multiple;if(!multiple&&files.length>1){return false}return files.every((function(file){return fileAccepted(file,accept)&&fileMatchSize(file,minSize,maxSize)}))}function isPropagationStopped(event){if(typeof event.isPropagationStopped==="function"){return event.isPropagationStopped()}else if(typeof event.cancelBubble!=="undefined"){return event.cancelBubble}return false}function isEvtWithFiles(event){if(!event.dataTransfer){return!!event.target&&!!event.target.files}return Array.prototype.some.call(event.dataTransfer.types,(function(type){return type==="Files"||type==="application/x-moz-file"}))}function onDocumentDragOver(event){event.preventDefault()}function isIe(userAgent){return userAgent.indexOf("MSIE")!==-1||userAgent.indexOf("Trident/")!==-1}function isEdge(userAgent){return userAgent.indexOf("Edge/")!==-1}function isIeOrEdge(){var userAgent=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return isIe(userAgent)||isEdge(userAgent)}function composeEventHandlers(){for(var _len=arguments.length,fns=new Array(_len),_key=0;_key<_len;_key++){fns[_key]=arguments[_key]}return function(event){for(var _len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){args[_key2-1]=arguments[_key2]}return fns.some((function(fn){if(!isPropagationStopped(event)&&fn){fn.apply(void 0,[event].concat(args))}return isPropagationStopped(event)}))}}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(iter){if(Symbol.iterator in Object(iter)||Object.prototype.toString.call(iter)==="[object Arguments]")return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr)){for(var i=0,arr2=new Array(arr.length);i<arr.length;i++){arr2[i]=arr[i]}return arr2}}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _iterableToArrayLimit(arr,i){if(!(Symbol.iterator in Object(arr)||Object.prototype.toString.call(arr)==="[object Arguments]")){return}var _arr=[];var _n=true;var _d=false;var _e=void 0;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"]!=null)_i["return"]()}finally{if(_d)throw _e}}return _arr}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function ownKeys$1(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}));keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys$1(source,true).forEach((function(key){_defineProperty$1(target,key,source[key])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source))}else{ownKeys$1(source).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}}return target}function _defineProperty$1(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _objectWithoutProperties$1(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose$1(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}}return target}function _objectWithoutPropertiesLoose$1(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key]}return target}var Dropzone=forwardRef((function(_ref,ref){var children=_ref.children,params=_objectWithoutProperties$1(_ref,["children"]);var _useDropzone=useDropzone(params),open=_useDropzone.open,props=_objectWithoutProperties$1(_useDropzone,["open"]);useImperativeHandle(ref,(function(){return{open:open}}),[open]);return React__default.createElement(Fragment$1,null,children(_objectSpread({},props,{open:open})))}));Dropzone.displayName="Dropzone";Dropzone.propTypes={children:PropTypes.func,accept:PropTypes.oneOfType([PropTypes.string,PropTypes.arrayOf(PropTypes.string)]),multiple:PropTypes.bool,preventDropOnDocument:PropTypes.bool,noClick:PropTypes.bool,noKeyboard:PropTypes.bool,noDrag:PropTypes.bool,noDragEventsBubbling:PropTypes.bool,minSize:PropTypes.number,maxSize:PropTypes.number,disabled:PropTypes.bool,getFilesFromEvent:PropTypes.func,onFileDialogCancel:PropTypes.func,onDragEnter:PropTypes.func,onDragLeave:PropTypes.func,onDragOver:PropTypes.func,onDrop:PropTypes.func,onDropAccepted:PropTypes.func,onDropRejected:PropTypes.func};var initialState$1={isFocused:false,isFileDialogActive:false,isDragActive:false,isDragAccept:false,isDragReject:false,draggedFiles:[],acceptedFiles:[],rejectedFiles:[]};function useDropzone(){var _ref2=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},accept=_ref2.accept,_ref2$disabled=_ref2.disabled,disabled=_ref2$disabled===void 0?false:_ref2$disabled,_ref2$getFilesFromEve=_ref2.getFilesFromEvent,getFilesFromEvent=_ref2$getFilesFromEve===void 0?fromEvent:_ref2$getFilesFromEve,_ref2$maxSize=_ref2.maxSize,maxSize=_ref2$maxSize===void 0?Infinity:_ref2$maxSize,_ref2$minSize=_ref2.minSize,minSize=_ref2$minSize===void 0?0:_ref2$minSize,_ref2$multiple=_ref2.multiple,multiple=_ref2$multiple===void 0?true:_ref2$multiple,onDragEnter=_ref2.onDragEnter,onDragLeave=_ref2.onDragLeave,onDragOver=_ref2.onDragOver,onDrop=_ref2.onDrop,onDropAccepted=_ref2.onDropAccepted,onDropRejected=_ref2.onDropRejected,onFileDialogCancel=_ref2.onFileDialogCancel,_ref2$preventDropOnDo=_ref2.preventDropOnDocument,preventDropOnDocument=_ref2$preventDropOnDo===void 0?true:_ref2$preventDropOnDo,_ref2$noClick=_ref2.noClick,noClick=_ref2$noClick===void 0?false:_ref2$noClick,_ref2$noKeyboard=_ref2.noKeyboard,noKeyboard=_ref2$noKeyboard===void 0?false:_ref2$noKeyboard,_ref2$noDrag=_ref2.noDrag,noDrag=_ref2$noDrag===void 0?false:_ref2$noDrag,_ref2$noDragEventsBub=_ref2.noDragEventsBubbling,noDragEventsBubbling=_ref2$noDragEventsBub===void 0?false:_ref2$noDragEventsBub;var rootRef=useRef(null);var inputRef=useRef(null);var _useReducer=useReducer(reducer,initialState$1),_useReducer2=_slicedToArray(_useReducer,2),state=_useReducer2[0],dispatch=_useReducer2[1];var isFocused=state.isFocused,isFileDialogActive=state.isFileDialogActive,draggedFiles=state.draggedFiles;var openFileDialog=useCallback((function(){if(inputRef.current){dispatch({type:"openDialog"});inputRef.current.value=null;inputRef.current.click()}}),[dispatch]);var onWindowFocus=function onWindowFocus2(){if(isFileDialogActive){setTimeout((function(){if(inputRef.current){var files=inputRef.current.files;if(!files.length){dispatch({type:"closeDialog"});if(typeof onFileDialogCancel==="function"){onFileDialogCancel()}}}}),300)}};useEffect((function(){window.addEventListener("focus",onWindowFocus,false);return function(){window.removeEventListener("focus",onWindowFocus,false)}}),[inputRef,isFileDialogActive,onFileDialogCancel]);var onKeyDownCb=useCallback((function(event){if(!rootRef.current||!rootRef.current.isEqualNode(event.target)){return}if(event.keyCode===32||event.keyCode===13){event.preventDefault();openFileDialog()}}),[rootRef,inputRef]);var onFocusCb=useCallback((function(){dispatch({type:"focus"})}),[]);var onBlurCb=useCallback((function(){dispatch({type:"blur"})}),[]);var onClickCb=useCallback((function(){if(noClick){return}if(isIeOrEdge()){setTimeout(openFileDialog,0)}else{openFileDialog()}}),[inputRef,noClick]);var dragTargetsRef=useRef([]);var onDocumentDrop=function onDocumentDrop2(event){if(rootRef.current&&rootRef.current.contains(event.target)){return}event.preventDefault();dragTargetsRef.current=[]};useEffect((function(){if(preventDropOnDocument){document.addEventListener("dragover",onDocumentDragOver,false);document.addEventListener("drop",onDocumentDrop,false)}return function(){if(preventDropOnDocument){document.removeEventListener("dragover",onDocumentDragOver);document.removeEventListener("drop",onDocumentDrop)}}}),[rootRef,preventDropOnDocument]);var onDragEnterCb=useCallback((function(event){event.preventDefault();event.persist();stopPropagation(event);if(dragTargetsRef.current.indexOf(event.target)===-1){dragTargetsRef.current=[].concat(_toConsumableArray(dragTargetsRef.current),[event.target])}if(isEvtWithFiles(event)){Promise.resolve(getFilesFromEvent(event)).then((function(draggedFiles2){if(isPropagationStopped(event)&&!noDragEventsBubbling){return}dispatch({draggedFiles:draggedFiles2,isDragActive:true,type:"setDraggedFiles"});if(onDragEnter){onDragEnter(event)}}))}}),[getFilesFromEvent,onDragEnter,noDragEventsBubbling]);var onDragOverCb=useCallback((function(event){event.preventDefault();event.persist();stopPropagation(event);if(event.dataTransfer){try{event.dataTransfer.dropEffect="copy"}catch(_unused){}}if(isEvtWithFiles(event)&&onDragOver){onDragOver(event)}return false}),[onDragOver,noDragEventsBubbling]);var onDragLeaveCb=useCallback((function(event){event.preventDefault();event.persist();stopPropagation(event);var targets=dragTargetsRef.current.filter((function(target){return target!==event.target&&rootRef.current&&rootRef.current.contains(target)}));dragTargetsRef.current=targets;if(targets.length>0){return}dispatch({isDragActive:false,type:"setDraggedFiles",draggedFiles:[]});if(isEvtWithFiles(event)&&onDragLeave){onDragLeave(event)}}),[rootRef,onDragLeave,noDragEventsBubbling]);var onDropCb=useCallback((function(event){event.preventDefault();event.persist();stopPropagation(event);dragTargetsRef.current=[];if(isEvtWithFiles(event)){Promise.resolve(getFilesFromEvent(event)).then((function(files){if(isPropagationStopped(event)&&!noDragEventsBubbling){return}var acceptedFiles=[];var rejectedFiles=[];files.forEach((function(file){if(fileAccepted(file,accept)&&fileMatchSize(file,minSize,maxSize)){acceptedFiles.push(file)}else{rejectedFiles.push(file)}}));if(!multiple&&acceptedFiles.length>1){rejectedFiles.push.apply(rejectedFiles,_toConsumableArray(acceptedFiles.splice(0)))}dispatch({acceptedFiles:acceptedFiles,rejectedFiles:rejectedFiles,type:"setFiles"});if(onDrop){onDrop(acceptedFiles,rejectedFiles,event)}if(rejectedFiles.length>0&&onDropRejected){onDropRejected(rejectedFiles,event)}if(acceptedFiles.length>0&&onDropAccepted){onDropAccepted(acceptedFiles,event)}}))}dispatch({type:"reset"})}),[multiple,accept,minSize,maxSize,getFilesFromEvent,onDrop,onDropAccepted,onDropRejected,noDragEventsBubbling]);var composeHandler=function composeHandler2(fn){return disabled?null:fn};var composeKeyboardHandler=function composeKeyboardHandler2(fn){return noKeyboard?null:composeHandler(fn)};var composeDragHandler=function composeDragHandler2(fn){return noDrag?null:composeHandler(fn)};var stopPropagation=function stopPropagation2(event){if(noDragEventsBubbling){event.stopPropagation()}};var getRootProps=useMemo((function(){return function(){var _ref3=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_ref3$refKey=_ref3.refKey,refKey=_ref3$refKey===void 0?"ref":_ref3$refKey,onKeyDown=_ref3.onKeyDown,onFocus=_ref3.onFocus,onBlur=_ref3.onBlur,onClick=_ref3.onClick,onDragEnter2=_ref3.onDragEnter,onDragOver2=_ref3.onDragOver,onDragLeave2=_ref3.onDragLeave,onDrop2=_ref3.onDrop,rest=_objectWithoutProperties$1(_ref3,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return _objectSpread(_defineProperty$1({onKeyDown:composeKeyboardHandler(composeEventHandlers(onKeyDown,onKeyDownCb)),onFocus:composeKeyboardHandler(composeEventHandlers(onFocus,onFocusCb)),onBlur:composeKeyboardHandler(composeEventHandlers(onBlur,onBlurCb)),onClick:composeHandler(composeEventHandlers(onClick,onClickCb)),onDragEnter:composeDragHandler(composeEventHandlers(onDragEnter2,onDragEnterCb)),onDragOver:composeDragHandler(composeEventHandlers(onDragOver2,onDragOverCb)),onDragLeave:composeDragHandler(composeEventHandlers(onDragLeave2,onDragLeaveCb)),onDrop:composeDragHandler(composeEventHandlers(onDrop2,onDropCb))},refKey,rootRef),!disabled&&!noKeyboard?{tabIndex:0}:{},{},rest)}}),[rootRef,onKeyDownCb,onFocusCb,onBlurCb,onClickCb,onDragEnterCb,onDragOverCb,onDragLeaveCb,onDropCb,noKeyboard,noDrag,disabled]);var onInputElementClick=useCallback((function(event){event.stopPropagation()}),[]);var getInputProps=useMemo((function(){return function(){var _ref4=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_ref4$refKey=_ref4.refKey,refKey=_ref4$refKey===void 0?"ref":_ref4$refKey,onChange=_ref4.onChange,onClick=_ref4.onClick,rest=_objectWithoutProperties$1(_ref4,["refKey","onChange","onClick"]);var inputProps=_defineProperty$1({accept:accept,multiple:multiple,type:"file",style:{display:"none"},onChange:composeHandler(composeEventHandlers(onChange,onDropCb)),onClick:composeHandler(composeEventHandlers(onClick,onInputElementClick)),autoComplete:"off",tabIndex:-1},refKey,inputRef);return _objectSpread({},inputProps,{},rest)}}),[inputRef,accept,multiple,onDropCb,disabled]);var fileCount=draggedFiles.length;var isDragAccept=fileCount>0&&allFilesAccepted({files:draggedFiles,accept:accept,minSize:minSize,maxSize:maxSize,multiple:multiple});var isDragReject=fileCount>0&&!isDragAccept;return _objectSpread({},state,{isDragAccept:isDragAccept,isDragReject:isDragReject,isFocused:isFocused&&!disabled,getRootProps:getRootProps,getInputProps:getInputProps,rootRef:rootRef,inputRef:inputRef,open:composeHandler(openFileDialog)})}function reducer(state,action){switch(action.type){case"focus":return _objectSpread({},state,{isFocused:true});case"blur":return _objectSpread({},state,{isFocused:false});case"openDialog":return _objectSpread({},state,{isFileDialogActive:true});case"closeDialog":return _objectSpread({},state,{isFileDialogActive:false});case"setDraggedFiles":var isDragActive=action.isDragActive,draggedFiles=action.draggedFiles;return _objectSpread({},state,{draggedFiles:draggedFiles,isDragActive:isDragActive});case"setFiles":return _objectSpread({},state,{acceptedFiles:action.acceptedFiles,rejectedFiles:action.rejectedFiles});case"reset":return _objectSpread({},state,{isFileDialogActive:false,isDragActive:false,draggedFiles:[],acceptedFiles:[],rejectedFiles:[]});default:return state}}const getFormattedFileSize=fileSize=>`${fileSize/1e6} MB`;const FileUpload=props=>{const{accept:accept=null,acceptedFilesDescription:acceptedFilesDescription="",className:className,customMessage:customMessage,data:data={},htmlOptions:htmlOptions={},maxSize:maxSize,onFilesAccepted:onFilesAccepted=noop$3,onFilesRejected:onFilesRejected=noop$3}=props;const onDrop=useCallback((files=>{onFilesAccepted(files)}),[onFilesAccepted]);const{getRootProps:getRootProps,getInputProps:getInputProps,isDragActive:isDragActive,rejectedFiles:rejectedFiles}=useDropzone({accept:accept,maxSize:maxSize,onDrop:onDrop});const prevRejected=useRef(null);const maxFileSizeText=`Max file size is ${getFormattedFileSize(maxSize)}.`;useEffect((()=>{if(rejectedFiles===prevRejected.current)return;const isFileTooLarge=maxSize&&rejectedFiles.length>0&&rejectedFiles[0].size>maxSize;if(isFileTooLarge){onFilesRejected(`File size is too large! ${maxFileSizeText}`,rejectedFiles)}prevRejected.current=rejectedFiles}),[maxFileSizeText,maxSize,onFilesRejected,rejectedFiles]);const acceptedFileTypes=()=>accept.map((fileType=>{if(fileType.startsWith("image/")){return fileType.replace("image/"," ")}else{return fileType}}));const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const getDescription=()=>customMessage?customMessage:`Choose a file or drag it here.${accept===null?"":` The accepted file types are: ${acceptedFilesDescription||acceptedFileTypes()}.`}${maxSize?` ${maxFileSizeText}`:""}`;return jsx("div",{className:classnames(buildCss("pb_file_upload_kit"),globalProps(props),className),...dataProps,...htmlProps,...getRootProps(),children:jsxs(Card,{children:[jsx("input",{...getInputProps()}),jsx(Body$1,{color:"light",children:isDragActive?jsx("p",{children:"Drop the files here ..."}):jsx("p",{children:getDescription()})})]})})};const hiddenFilters=value=>isEmpty(value)&&value!==true;const CurrentFilters=({dark:dark,filters:filters})=>{const displayableFilters=omitBy(filters,hiddenFilters);return jsxs("div",{className:"maskContainer",children:[isEmpty(filters)&&jsx("div",{className:"filters",children:jsx(Body$1,{color:"light",paddingLeft:"xs",size:4,tag:"span",text:"No Filter Selected"})}),!isEmpty(filters)&&jsxs("div",{className:"filters",children:[jsx("div",{className:"left_gradient"}),map(displayableFilters,((value,name)=>jsx("div",{className:"filter",children:value===true?jsx(Title,{dark:dark,size:4,tag:"h4",text:name}):jsxs("div",{children:[jsx(Caption,{dark:dark,text:name}),jsx(Title,{dark:dark,size:4,tag:"h4",text:value})]})},`filter-${name}`))),jsx("div",{className:"right_gradient"})]})]})};const FilterBackground=props=>{const{background:background=true,className:className,children:children,dark:dark}=props;return jsx("div",{className:classnames(`pb_filter_kit ${className}`,globalProps(props)),children:background?jsx(Card,{dark:dark,padding:"none",children:children}):jsx(Fragment,{children:children})})};const FiltersPopover=({children:children,dark:dark,maxHeight:maxHeight,minWidth:minWidth,placement:placement="bottom-start"})=>{const[hide2,updateHide]=useState(true);const toggle=()=>updateHide(!hide2);const filterButton=jsx(CircleIconButton,{dark:dark,icon:"filter",id:"filter",onClick:toggle,variant:"secondary"});return jsx(PbReactPopover,{closeOnClick:"outside",maxHeight:maxHeight,minWidth:minWidth,placement:placement,reference:filterButton,shouldClosePopover:updateHide,show:!hide2,children:jsx("div",{className:"pb-form",children:typeof children==="function"?children({closePopover:()=>updateHide(true)}):children})})};const TitleCount=props=>{const{align:align="left",aria:aria={},className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},count:count2,id:id,title:title,size:size="sm"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const css=classnames(buildCss("pb_title_count_kit",align,size),globalProps(props),className);const formatCount=count2.toLocaleString();return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:css,id:id,children:[jsx(Title,{className:title!==void 0?"pb_title_count_text":"",dark:dark,size:size==="lg"?3:4,text:title}),jsx(Body$1,{color:"light",dark:dark,children:count2&&formatCount})]})};const resultsText=results=>results==1?"Result":"Results";const ResultsCount=({dark:dark,results:results,title:title})=>{const resultTitle=()=>jsx(TitleCount,{align:"center",count:results,dark:dark,title:`${resultsText(results)}:`});const justResults=()=>jsx(Caption,{className:"filter-results",dark:dark,size:"xs",text:`${results} ${resultsText(results)}`});const displayResultsCount=()=>{if(results&&title){return jsx(Fragment,{children:resultTitle()})}else if(results){return jsx(Fragment,{children:justResults()})}else{return jsx("div",{})}};return jsx(Fragment,{children:displayResultsCount()})};const nextValue=(value,name)=>{const current=find$1(value,{name:name});return{name:name,dir:current&¤t.dir=="asc"?"desc":"asc"}};const directionIcon=dir=>dir=="asc"?"sort-amount-up":"sort-amount-down";const renderOptions=(options,value,handleChange)=>map(options,((label,name)=>{const next=nextValue(value,name);return jsx(ListItem,{children:jsx(Button,{htmlType:void 0,onClick:partial(handleChange,next),text:` ${label}`,variant:"link"})},`option-${next.name}-${next.dir}`)}));const SortMenu=({dark:dark,options:options,value:value,onChange:onChange})=>{const[hide2,updateHide]=useState(true);const toggle=()=>updateHide(!hide2);const handleChange=value2=>{updateHide(true);onChange([value2])};const sortButton=jsx(Button,{dark:dark,htmlType:void 0,id:"sort-button",onClick:toggle,paddingRight:"none",variant:"link",children:map(value,(({dir:dir,name:name})=>jsxs("span",{children:[` ${options[name]}`,jsx(Icon,{dark:dark,icon:directionIcon(dir)})]},`current-sort-${name}-${dir}`)))});return jsx(PbReactPopover,{className:"pb_filter_sort_menu",closeOnClick:"outside",padding:"none",placement:"bottom",reference:sortButton,shouldClosePopover:updateHide,show:!hide2,children:jsx(List,{children:renderOptions(options,value,handleChange)})})};const FilterSingle=({onSortChange:onSortChange,sortOptions:sortOptions,sortValue:sortValue,filters:filters,results:results,children:children,dark:dark,maxHeight:maxHeight,minWidth:minWidth,placement:placement,...bgProps})=>jsx(FilterBackground,{dark:dark,...bgProps,children:jsxs(Flex,{orientation:"row",paddingRight:"lg",vertical:"center",children:[children&&jsxs(Fragment,{children:[jsx(FiltersPopover,{dark:dark,maxHeight:maxHeight,minWidth:minWidth,placement:placement,children:children}),jsx(CurrentFilters,{dark:dark,filters:filters})]}),jsx(ResultsCount,{dark:dark,results:results}),!isEmpty(sortOptions)&&jsx(SortMenu,{dark:dark,onChange:onSortChange,options:sortOptions,value:sortValue})]})});const FilterDouble=({onSortChange:onSortChange,sortOptions:sortOptions,sortValue:sortValue,filters:filters,results:results,children:children,dark:dark,maxHeight:maxHeight,minWidth:minWidth,placement:placement,...bgProps})=>jsxs(FilterBackground,{dark:dark,...bgProps,children:[jsxs(Flex,{orientation:"row",vertical:"center",children:[jsx(FiltersPopover,{dark:dark,maxHeight:maxHeight,minWidth:minWidth,placement:placement,children:children}),jsx(CurrentFilters,{dark:dark,filters:filters})]}),jsx(SectionSeparator,{dark:dark}),jsxs(Flex,{className:"filter-bottom",orientation:"row",spacing:"between",vertical:"center",children:[jsx(ResultsCount,{dark:dark,results:results,title:true}),jsxs(Flex,{orientation:"row",vertical:"center",children:[jsx(Caption,{dark:dark,text:"sort by:"}),jsx(SortMenu,{dark:dark,onChange:onSortChange,options:sortOptions,value:sortValue})]})]})]});const Filter=({double:double=false,...templateProps})=>{const displayFilter=()=>{if(double===true){return jsx(FilterDouble,{...templateProps})}else{return jsx(FilterSingle,{...templateProps})}};return jsx(Fragment,{children:displayFilter()})};const iconMap={success:"check",error:"exclamation-triangle",neutral:"info-circle",tip:"info-circle"};const FixedConfirmationToast=props=>{const[showToast,toggleToast]=useState(true);const{autoClose:autoClose=0,children:children,className:className,closeable:closeable=false,horizontal:horizontal,htmlOptions:htmlOptions={},icon:icon,multiLine:multiLine=false,onClose:onClose=()=>void 0,open:open=true,status:status="neutral",text:text2,vertical:vertical}=props;const returnedIcon=icon||iconMap[status];const iconClass=icon?"custom_icon":"";const css=classnames(`pb_fixed_confirmation_toast_kit_${status}`,{_multi_line:multiLine},{[`positioned_toast ${vertical} ${horizontal}`]:vertical&&horizontal},`${iconClass}`,globalProps(props),className);const htmlProps=buildHtmlProps(htmlOptions);const autoCloseToast=()=>{if(autoClose&&open){setTimeout((()=>{toggleToast(false);onClose()}),autoClose)}};useEffect((()=>{toggleToast(open);autoCloseToast()}),[open]);const handleClick=()=>{toggleToast(!closeable);onClose()};return jsx(Fragment,{children:showToast&&jsxs("div",{className:css,onClick:handleClick,...htmlProps,children:[returnedIcon&&jsx(Icon,{className:"pb_icon",fixedWidth:true,icon:returnedIcon}),children&&children||text2&&jsx(Title,{className:"pb_fixed_confirmation_toast_text",flex:"1",size:4,text:text2}),closeable&&jsx(Icon,{className:"pb_icon",cursor:"pointer",fixedWidth:false,icon:"times"})]})})};const FormGroup=props=>{const{aria:aria={},className:className,data:data={},fullWidth:fullWidth=false,htmlOptions:htmlOptions={},id:id,children:children}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_form_group_kit",{full:fullWidth}),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})};const typeMap={home:"H#",project:"P#",appointment:"A#",default:"#"};const Hashtag=props=>{const{aria:aria={},className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,newWindow:newWindow,rel:rel,text:text2,type:type="default",url:url}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_hashtag_kit"),globalProps(props),className);return jsx("span",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsx("a",{href:url,rel:newWindow?"noreferrer":rel,target:newWindow?"_blank":"_self",children:jsx(Badge,{dark:dark,text:typeMap[type]+text2,variant:"primary"})})})};const HomeAddressStreet=props=>{const{address:address,addressCont:addressCont,aria:aria={},city:city,className:className,data:data={},dark:dark=false,emphasis:emphasis="street",htmlOptions:htmlOptions={},homeId:homeId,homeUrl:homeUrl,newWindow:newWindow,houseStyle:houseStyle,state:state,zipcode:zipcode,territory:territory}=props;const classes=(className2,dark2)=>classnames({pb_home_address_street:!dark2,pb_home_address_street_dark:dark2},globalProps(props),className2);const dataProps=buildDataProps(data);const ariaProps=buildAriaProps(aria);const htmlProps=buildHtmlProps(htmlOptions);return jsxs("div",{className:classes(className,dark),...ariaProps,...dataProps,...htmlProps,children:[emphasis=="street"&&jsxs("div",{children:[jsx(Title,{className:"pb_home_address_street_address",dark:dark,size:4,children:joinPresent([titleize(address),houseStyle]," · ")}),jsx(Title,{className:"pb_home_address_street_address",dark:dark,size:4,children:titleize(addressCont)}),jsx(Body$1,{color:"light",children:`${titleize(city)}, ${state} ${zipcode}`})]}),emphasis=="city"&&jsxs("div",{children:[jsx(Body$1,{color:"light",children:joinPresent([titleize(address),houseStyle]," · ")}),jsx(Body$1,{color:"light",children:titleize(addressCont)}),jsxs("div",{children:[jsx(Title,{className:"pb_home_address_street_address",dark:dark,size:4,tag:"span",children:`${titleize(city)}, ${state}`}),jsx(Body$1,{color:"light",tag:"span",children:` ${zipcode}`})]})]}),homeId&&jsx(Hashtag,{classname:"home-hashtag",dark:dark,marginRight:"xxs",newWindow:newWindow,text:homeId,type:"home",url:homeUrl||"#"}),jsx(Body$1,{color:"light",tag:"span",children:jsx("small",{children:territory})})]})};const IconStatValue=props=>{const{aria:aria={},className:className,data:data={},dark:dark=false,htmlOptions:htmlOptions={},icon:icon,id:id,orientation:orientation="horizontal",size:size="sm",text:text2="",unit:unit="",value:value=0,variant:variant="lighter"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_icon_stat_value_kit",orientation,size,variant),globalProps(props),className);const titleSize=function(size2){if(size2=="lg"){return jsx(Title,{dark:dark,size:1,tag:"span",text:`${value}`})}else if(size2=="md"){return jsx(Title,{dark:dark,size:2,tag:"span",text:`${value}`})}else{return jsx(Title,{dark:dark,size:3,tag:"span",text:`${value}`})}};return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[jsx(IconCircle,{dark:dark,icon:icon,size:size,variant:variant}),jsxs("div",{children:[jsxs(Flex,{align:"baseline",children:[titleSize(size)," ",jsx(Body$1,{dark:dark,text:unit})]}),jsx(Caption,{dark:dark,text:text2})]})]})};const IconValue=props=>{const{align:align="left",aria:aria={},className:className,dark:dark,data:data={},htmlOptions:htmlOptions={},icon:icon,id:id,text:text2}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_icon_value_kit",align),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsxs(Body$1,{color:"light",dark:dark,children:[jsx(Icon,{dark:dark,fixedWidth:true,icon:icon}),text2]})})};const Pill=props=>{const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,text:text2,variant:variant="neutral",textTransform:textTransform="lowercase"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_pill_kit",variant,textTransform),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsx(Title,{className:"pb_pill_text",size:4,tag:"div",text:text2})})};const LabelPill=props=>{const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,label:label,pillValue:pillValue,variant:variant="neutral"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const css=classnames("pb_label_pill_kit",globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:css,id:id,children:[jsx(Caption,{className:"pb_label_pill_label",text:label}),jsx(Pill,{className:"pb_label_pill_pill",text:pillValue,variant:variant})]})};const dateString=value=>{const month=DateTime$1.toMonthNum(value);const day=DateTime$1.toDay(value);return` · ${month}/${day}`};const LabelValue=props=>{const{active:active=false,aria:aria={},className:className,dark:dark=false,data:data={},date:date,description:description,htmlOptions:htmlOptions={},icon:icon,id:id,label:label,title:title,value:value,variant:variant="default"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const variantClass=variant==="details"?"details":"";const classes=classnames(buildCss("pb_label_value_kit",variantClass),globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,title:title,children:[jsx(Caption,{dark:dark,text:label}),variant==="details"?jsxs(Flex,{inline:true,vertical:"center",children:[icon&&jsx(Body$1,{color:"light",dark:dark,marginRight:"xs",children:jsx(Icon,{dark:dark,fixedWidth:true,icon:icon})}),description&&jsx(Body$1,{color:"light",dark:dark,marginRight:"xs",text:description}),active===true?jsxs(Flex,{inline:true,vertical:"center",children:[title&&jsx(Title,{dark:dark,size:4,text:title,variant:"link"}),date&&jsx(Title,{dark:dark,marginLeft:"xs",size:4,text:" "+dateString(date),variant:"link"})]}):jsxs(Fragment,{children:[title&&jsx(Title,{dark:dark,size:4,text:title}),date&&jsx(Title,{dark:dark,marginLeft:"xs",size:4,text:" "+dateString(date)})]})]}):jsx(Body$1,{dark:dark,text:value})]})};const Side=props=>{const{children:children,className:className}=props;return jsx("div",{className:classnames("layout_sidebar",globalProps(props),className),children:children})};const Body=props=>{const{children:children,className:className}=props;return jsx("div",{className:classnames("layout_body",globalProps(props),className),children:children})};const Item=props=>{const{children:children,className:className,size:size="sm"}=props;const sizeClass=`size_${size}`;return jsx("div",{className:classnames("layout_item",sizeClass,globalProps(props),className),children:children})};const Header=props=>{const{children:children,className:className}=props;return jsx("div",{className:classnames("layout_header",globalProps(props),className),children:children})};const Footer=props=>{const{children:children,className:className}=props;return jsx("div",{className:classnames("layout_footer",globalProps(props),className),children:children})};const Layout=props=>{const{aria:aria={},children:children,className:className,collapse:collapse="md",dark:dark=false,data:data={},full:full=false,htmlOptions:htmlOptions={},position:position="left",responsive:responsive=false,size:size="md",layout:layout="sidebar",variant:variant="light",transparent:transparent=false}=props;const responsiveClass=responsive?"_responsive":"";const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const layoutCss=layout=="collection"?`pb_layout_kit_${layout}`:layout=="kanban"?`pb_layout_kit_${layout}${responsiveClass}`:buildCss(`pb_layout_kit_${layout}`,`size_${size}`,position,variant,{dark:dark,transparent:transparent,full:full});const layoutCollapseCss=layout=="collection"?"":layout=="kanban"?"":buildCss("layout",position,"collapse",collapse);const layoutChildren=React__default.Children.toArray(children);const subComponentTags=tagName=>layoutChildren.filter((c=>{var _a;return((_a=c.type)==null?void 0:_a.displayName)===tagName})).map(((child,i)=>React__default.cloneElement(child,{key:`${tagName.toLowerCase()}-${i}`})));const nonSideChildren=layoutChildren.filter((child=>{var _a;return((_a=child.type)==null?void 0:_a.displayName)!=="Side"}));const filteredProps={...props};filteredProps==null?true:delete filteredProps.position;return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classnames(layoutCss,layoutCollapseCss,className,globalProps(filteredProps)),children:[subComponentTags("Side"),nonSideChildren]})};Layout.Side=Side;Layout.Body=Body;Layout.Item=Item;Layout.Header=Header;Layout.Footer=Footer;const useKbdControls=api=>{const[cmdKey,setCmdKey]=useState("");useEffect((()=>{const handleKeyDown=({key:key})=>{const keyCmd=key.toLowerCase();setCmdKey(keyCmd);switch(keyCmd){case"escape":{api.onClose();break}case"arrowleft":{api.onArrowLeft();break}case"arrowright":{api.onArrowRight();break}}};window.addEventListener("keydown",handleKeyDown);return()=>{window.removeEventListener("keydown",handleKeyDown)}}),[api]);return cmdKey};const LightboxContext=React__default.createContext({});const LightboxHeader=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},onClickRight:onClickRight,spacing:spacing="between",text:text2,navRight:navRight,title:title,closeable:closeable=true,icon:icon="times"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const api=useContext(LightboxContext);const headerCSS=buildCss("lightbox_header");const headerSpacing=globalProps(props,{paddingY:"sm"});const handleOnLightboxClose=()=>api.onClose();const HeaderBody=()=>jsxs(React__default.Fragment,{children:[jsx(FlexItem,{flex:"1",marginLeft:"sm",children:jsx(CircleIconButton,{dark:true,icon:icon,onClick:handleOnLightboxClose,variant:"link"})}),title&&text2&&jsx(FlexItem,{flex:"5",children:jsx(Flex,{justify:"center",children:jsxs(Flex,{align:"center",orientation:"column",children:[typeof title==="string"?jsx(Title,{dark:true,paddingBottom:"xxs",size:4,text:title}):jsx(Flex,{className:"custom-header",justify:"center",children:title}),typeof text2==="string"?jsx(Caption,{dark:true,children:text2}):jsx(Flex,{className:"custom-header",justify:"center",children:text2})]})})}),jsx(FlexItem,{flex:"1",children:jsx(Flex,{justify:"end",children:jsx(Button,{className:"nav-right-btn",dark:true,htmlType:"button",onClick:onClickRight,text:navRight,variant:"link"})})})]});return jsx("div",{className:"carousel-header",children:jsxs(Flex,{...ariaProps,...dataProps,...htmlProps,className:classnames(headerCSS,headerSpacing,className),spacing:spacing,children:[closeable&&jsx(HeaderBody,{}),children]})})};var roundNumber=function(num,decimal){return Number(num.toFixed(decimal))};var checkIsNumber=function(num,defaultValue){return defaultValue};var handleCallback=function(context,event,callback){if(callback&&typeof callback==="function"){callback(context,event)}};var easeOut=function(t){return-Math.cos(t*Math.PI)/2+.5};var linear=function(t){return t};var easeInQuad=function(t){return t*t};var easeOutQuad=function(t){return t*(2-t)};var easeInOutQuad=function(t){return t<.5?2*t*t:-1+(4-2*t)*t};var easeInCubic=function(t){return t*t*t};var easeOutCubic=function(t){return--t*t*t+1};var easeInOutCubic=function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1};var easeInQuart=function(t){return t*t*t*t};var easeOutQuart=function(t){return 1- --t*t*t*t};var easeInOutQuart=function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t};var easeInQuint=function(t){return t*t*t*t*t};var easeOutQuint=function(t){return 1+--t*t*t*t*t};var easeInOutQuint=function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t};var animations={easeOut:easeOut,linear:linear,easeInQuad:easeInQuad,easeOutQuad:easeOutQuad,easeInOutQuad:easeInOutQuad,easeInCubic:easeInCubic,easeOutCubic:easeOutCubic,easeInOutCubic:easeInOutCubic,easeInQuart:easeInQuart,easeOutQuart:easeOutQuart,easeInOutQuart:easeInOutQuart,easeInQuint:easeInQuint,easeOutQuint:easeOutQuint,easeInOutQuint:easeInOutQuint};var handleCancelAnimationFrame=function(animation){if(typeof animation==="number"){cancelAnimationFrame(animation)}};var handleCancelAnimation=function(contextInstance){if(!contextInstance.mounted)return;handleCancelAnimationFrame(contextInstance.animation);contextInstance.animate=false;contextInstance.animation=null;contextInstance.velocity=null};function handleSetupAnimation(contextInstance,animationName,animationTime,callback){if(!contextInstance.mounted)return;var startTime=(new Date).getTime();var lastStep=1;handleCancelAnimation(contextInstance);contextInstance.animation=function(){if(!contextInstance.mounted){return handleCancelAnimationFrame(contextInstance.animation)}var frameTime=(new Date).getTime()-startTime;var animationProgress=frameTime/animationTime;var animationType=animations[animationName];var step=animationType(animationProgress);if(frameTime>=animationTime){callback(lastStep);contextInstance.animation=null}else if(contextInstance.animation){callback(step);requestAnimationFrame(contextInstance.animation)}};requestAnimationFrame(contextInstance.animation)}function isValidTargetState(targetState){var scale=targetState.scale,positionX=targetState.positionX,positionY=targetState.positionY;if(Number.isNaN(scale)||Number.isNaN(positionX)||Number.isNaN(positionY)){return false}return true}function animate(contextInstance,targetState,animationTime,animationName){var isValid=isValidTargetState(targetState);if(!contextInstance.mounted||!isValid)return;var setTransformState=contextInstance.setTransformState;var _a=contextInstance.transformState,scale=_a.scale,positionX=_a.positionX,positionY=_a.positionY;var scaleDiff=targetState.scale-scale;var positionXDiff=targetState.positionX-positionX;var positionYDiff=targetState.positionY-positionY;if(animationTime===0){setTransformState(targetState.scale,targetState.positionX,targetState.positionY)}else{handleSetupAnimation(contextInstance,animationName,animationTime,(function(step){var newScale=scale+scaleDiff*step;var newPositionX=positionX+positionXDiff*step;var newPositionY=positionY+positionYDiff*step;setTransformState(newScale,newPositionX,newPositionY)}))}}function getComponentsSizes(wrapperComponent,contentComponent,newScale){var wrapperWidth=wrapperComponent.offsetWidth;var wrapperHeight=wrapperComponent.offsetHeight;var contentWidth=contentComponent.offsetWidth;var contentHeight=contentComponent.offsetHeight;var newContentWidth=contentWidth*newScale;var newContentHeight=contentHeight*newScale;var newDiffWidth=wrapperWidth-newContentWidth;var newDiffHeight=wrapperHeight-newContentHeight;return{wrapperWidth:wrapperWidth,wrapperHeight:wrapperHeight,newContentWidth:newContentWidth,newDiffWidth:newDiffWidth,newContentHeight:newContentHeight,newDiffHeight:newDiffHeight}}var getBounds=function(wrapperWidth,newContentWidth,diffWidth,wrapperHeight,newContentHeight,diffHeight,centerZoomedOut){var scaleWidthFactor=wrapperWidth>newContentWidth?diffWidth*(centerZoomedOut?1:.5):0;var scaleHeightFactor=wrapperHeight>newContentHeight?diffHeight*(centerZoomedOut?1:.5):0;var minPositionX=wrapperWidth-newContentWidth-scaleWidthFactor;var maxPositionX=scaleWidthFactor;var minPositionY=wrapperHeight-newContentHeight-scaleHeightFactor;var maxPositionY=scaleHeightFactor;return{minPositionX:minPositionX,maxPositionX:maxPositionX,minPositionY:minPositionY,maxPositionY:maxPositionY}};var calculateBounds=function(contextInstance,newScale){var wrapperComponent=contextInstance.wrapperComponent,contentComponent=contextInstance.contentComponent;var centerZoomedOut=contextInstance.setup.centerZoomedOut;if(!wrapperComponent||!contentComponent){throw new Error("Components are not mounted")}var _a=getComponentsSizes(wrapperComponent,contentComponent,newScale),wrapperWidth=_a.wrapperWidth,wrapperHeight=_a.wrapperHeight,newContentWidth=_a.newContentWidth,newDiffWidth=_a.newDiffWidth,newContentHeight=_a.newContentHeight,newDiffHeight=_a.newDiffHeight;var bounds=getBounds(wrapperWidth,newContentWidth,newDiffWidth,wrapperHeight,newContentHeight,newDiffHeight,Boolean(centerZoomedOut));return bounds};var boundLimiter=function(value,minBound,maxBound,isActive){if(!isActive)return roundNumber(value,2);if(value<minBound)return roundNumber(minBound,2);if(value>maxBound)return roundNumber(maxBound,2);return roundNumber(value,2)};var handleCalculateBounds=function(contextInstance,newScale){var bounds=calculateBounds(contextInstance,newScale);contextInstance.bounds=bounds;return bounds};function getMouseBoundedPosition(positionX,positionY,bounds,limitToBounds,paddingValueX,paddingValueY,wrapperComponent){var minPositionX=bounds.minPositionX,minPositionY=bounds.minPositionY,maxPositionX=bounds.maxPositionX,maxPositionY=bounds.maxPositionY;var paddingX=0;var paddingY=0;if(wrapperComponent){paddingX=paddingValueX;paddingY=paddingValueY}var x=boundLimiter(positionX,minPositionX-paddingX,maxPositionX+paddingX,limitToBounds);var y=boundLimiter(positionY,minPositionY-paddingY,maxPositionY+paddingY,limitToBounds);return{x:x,y:y}}function handleCalculateZoomPositions(contextInstance,mouseX,mouseY,newScale,bounds,limitToBounds){var _a=contextInstance.transformState,scale=_a.scale,positionX=_a.positionX,positionY=_a.positionY;var scaleDifference=newScale-scale;if(typeof mouseX!=="number"||typeof mouseY!=="number"){console.error("Mouse X and Y position were not provided!");return{x:positionX,y:positionY}}var calculatedPositionX=positionX-mouseX*scaleDifference;var calculatedPositionY=positionY-mouseY*scaleDifference;var newPositions=getMouseBoundedPosition(calculatedPositionX,calculatedPositionY,bounds,limitToBounds,0,0,null);return newPositions}function checkZoomBounds(zoom,minScale,maxScale,zoomPadding,enablePadding){var scalePadding=enablePadding?zoomPadding:0;var minScaleWithPadding=minScale-scalePadding;if(!Number.isNaN(maxScale)&&zoom>=maxScale)return maxScale;if(!Number.isNaN(minScale)&&zoom<=minScaleWithPadding)return minScaleWithPadding;return zoom}var isPanningStartAllowed=function(contextInstance,event){var excluded=contextInstance.setup.panning.excluded;var isInitialized=contextInstance.isInitialized,wrapperComponent=contextInstance.wrapperComponent;var target=event.target;var isWrapperChild=wrapperComponent===null||wrapperComponent===void 0?void 0:wrapperComponent.contains(target);var isAllowed=isInitialized&&target&&isWrapperChild;if(!isAllowed)return false;var isExcluded=isExcludedNode(target,excluded);if(isExcluded)return false;return true};var isPanningAllowed=function(contextInstance){var isInitialized=contextInstance.isInitialized,isPanning=contextInstance.isPanning,setup=contextInstance.setup;var disabled=setup.panning.disabled;var isAllowed=isInitialized&&isPanning&&!disabled;if(!isAllowed)return false;return true};var handlePanningSetup=function(contextInstance,event){var _a=contextInstance.transformState,positionX=_a.positionX,positionY=_a.positionY;contextInstance.isPanning=true;var x=event.clientX;var y=event.clientY;contextInstance.startCoords={x:x-positionX,y:y-positionY}};var handleTouchPanningSetup=function(contextInstance,event){var touches=event.touches;var _a=contextInstance.transformState,positionX=_a.positionX,positionY=_a.positionY;contextInstance.isPanning=true;var oneFingerTouch=touches.length===1;if(oneFingerTouch){var x=touches[0].clientX;var y=touches[0].clientY;contextInstance.startCoords={x:x-positionX,y:y-positionY}}};function handlePanToBounds(contextInstance){var _a=contextInstance.transformState,positionX=_a.positionX,positionY=_a.positionY,scale=_a.scale;var _b=contextInstance.setup,disabled=_b.disabled,limitToBounds=_b.limitToBounds,centerZoomedOut=_b.centerZoomedOut;var wrapperComponent=contextInstance.wrapperComponent;if(disabled||!wrapperComponent||!contextInstance.bounds)return;var _c=contextInstance.bounds,maxPositionX=_c.maxPositionX,minPositionX=_c.minPositionX,maxPositionY=_c.maxPositionY,minPositionY=_c.minPositionY;var xChanged=positionX>maxPositionX||positionX<minPositionX;var yChanged=positionY>maxPositionY||positionY<minPositionY;var mousePosX=positionX>maxPositionX?wrapperComponent.offsetWidth:contextInstance.setup.minPositionX||0;var mousePosY=positionY>maxPositionY?wrapperComponent.offsetHeight:contextInstance.setup.minPositionY||0;var _d=handleCalculateZoomPositions(contextInstance,mousePosX,mousePosY,scale,contextInstance.bounds,limitToBounds||centerZoomedOut),x=_d.x,y=_d.y;return{scale:scale,positionX:xChanged?x:positionX,positionY:yChanged?y:positionY}}function handleNewPosition(contextInstance,newPositionX,newPositionY,paddingValueX,paddingValueY){var limitToBounds=contextInstance.setup.limitToBounds;var wrapperComponent=contextInstance.wrapperComponent,bounds=contextInstance.bounds;var _a=contextInstance.transformState,scale=_a.scale,positionX=_a.positionX,positionY=_a.positionY;if(wrapperComponent===null||bounds===null||newPositionX===positionX&&newPositionY===positionY){return}var _b=getMouseBoundedPosition(newPositionX,newPositionY,bounds,limitToBounds,paddingValueX,paddingValueY,wrapperComponent),x=_b.x,y=_b.y;contextInstance.setTransformState(scale,x,y)}var getPanningClientPosition=function(contextInstance,clientX,clientY){var startCoords=contextInstance.startCoords,transformState=contextInstance.transformState;var panning=contextInstance.setup.panning;var lockAxisX=panning.lockAxisX,lockAxisY=panning.lockAxisY;var positionX=transformState.positionX,positionY=transformState.positionY;if(!startCoords){return{x:positionX,y:positionY}}var mouseX=clientX-startCoords.x;var mouseY=clientY-startCoords.y;var newPositionX=lockAxisX?positionX:mouseX;var newPositionY=lockAxisY?positionY:mouseY;return{x:newPositionX,y:newPositionY}};var getPaddingValue=function(contextInstance,size){var setup=contextInstance.setup,transformState=contextInstance.transformState;var scale=transformState.scale;var minScale=setup.minScale,disablePadding=setup.disablePadding;if(size>0&&scale>=minScale&&!disablePadding){return size}return 0};var isVelocityCalculationAllowed=function(contextInstance){var mounted=contextInstance.mounted;var _a=contextInstance.setup,disabled=_a.disabled,velocityAnimation=_a.velocityAnimation;var scale=contextInstance.transformState.scale;var disabledVelocity=velocityAnimation.disabled;var isAllowed=!disabledVelocity||scale>1||!disabled||mounted;if(!isAllowed)return false;return true};var isVelocityAllowed=function(contextInstance){var mounted=contextInstance.mounted,velocity=contextInstance.velocity,bounds=contextInstance.bounds;var _a=contextInstance.setup,disabled=_a.disabled,velocityAnimation=_a.velocityAnimation;var scale=contextInstance.transformState.scale;var disabledVelocity=velocityAnimation.disabled;var isAllowed=!disabledVelocity||scale>1||!disabled||mounted;if(!isAllowed)return false;if(!velocity||!bounds)return false;return true};function getVelocityMoveTime(contextInstance,velocity){var velocityAnimation=contextInstance.setup.velocityAnimation;var equalToMove=velocityAnimation.equalToMove,animationTime=velocityAnimation.animationTime,sensitivity=velocityAnimation.sensitivity;if(equalToMove){return animationTime*velocity*sensitivity}return animationTime}function getVelocityPosition(newPosition,startPosition,currentPosition,isLocked,limitToBounds,minPosition,maxPosition,minTarget,maxTarget,step){if(limitToBounds){if(startPosition>maxPosition&¤tPosition>maxPosition){var calculatedPosition=maxPosition+(newPosition-maxPosition)*step;if(calculatedPosition>maxTarget)return maxTarget;if(calculatedPosition<maxPosition)return maxPosition;return calculatedPosition}if(startPosition<minPosition&¤tPosition<minPosition){var calculatedPosition=minPosition+(newPosition-minPosition)*step;if(calculatedPosition<minTarget)return minTarget;if(calculatedPosition>minPosition)return minPosition;return calculatedPosition}}if(isLocked)return startPosition;return boundLimiter(newPosition,minPosition,maxPosition,limitToBounds)}function getSizeMultiplier(wrapperComponent,equalToMove){var defaultMultiplier=1;if(equalToMove){return Math.min(defaultMultiplier,wrapperComponent.offsetWidth/window.innerWidth)}return defaultMultiplier}function handleCalculateVelocity(contextInstance,position){var isAllowed=isVelocityCalculationAllowed(contextInstance);if(!isAllowed){return}var lastMousePosition=contextInstance.lastMousePosition,velocityTime=contextInstance.velocityTime,setup=contextInstance.setup;var wrapperComponent=contextInstance.wrapperComponent;var equalToMove=setup.velocityAnimation.equalToMove;var now=Date.now();if(lastMousePosition&&velocityTime&&wrapperComponent){var sizeMultiplier=getSizeMultiplier(wrapperComponent,equalToMove);var distanceX=position.x-lastMousePosition.x;var distanceY=position.y-lastMousePosition.y;var velocityX=distanceX/sizeMultiplier;var velocityY=distanceY/sizeMultiplier;var interval=now-velocityTime;var speed=distanceX*distanceX+distanceY*distanceY;var velocity=Math.sqrt(speed)/interval;contextInstance.velocity={velocityX:velocityX,velocityY:velocityY,total:velocity}}contextInstance.lastMousePosition=position;contextInstance.velocityTime=now}function handleVelocityPanning(contextInstance){var velocity=contextInstance.velocity,bounds=contextInstance.bounds,setup=contextInstance.setup,wrapperComponent=contextInstance.wrapperComponent;var isAllowed=isVelocityAllowed(contextInstance);if(!isAllowed||!velocity||!bounds||!wrapperComponent){return}var velocityX=velocity.velocityX,velocityY=velocity.velocityY,total=velocity.total;var maxPositionX=bounds.maxPositionX,minPositionX=bounds.minPositionX,maxPositionY=bounds.maxPositionY,minPositionY=bounds.minPositionY;var limitToBounds=setup.limitToBounds,alignmentAnimation=setup.alignmentAnimation;var zoomAnimation=setup.zoomAnimation,panning=setup.panning;var lockAxisY=panning.lockAxisY,lockAxisX=panning.lockAxisX;var animationType=zoomAnimation.animationType;var sizeX=alignmentAnimation.sizeX,sizeY=alignmentAnimation.sizeY,velocityAlignmentTime=alignmentAnimation.velocityAlignmentTime;var alignAnimationTime=velocityAlignmentTime;var moveAnimationTime=getVelocityMoveTime(contextInstance,total);var finalAnimationTime=Math.max(moveAnimationTime,alignAnimationTime);var paddingValueX=getPaddingValue(contextInstance,sizeX);var paddingValueY=getPaddingValue(contextInstance,sizeY);var paddingX=paddingValueX*wrapperComponent.offsetWidth/100;var paddingY=paddingValueY*wrapperComponent.offsetHeight/100;var maxTargetX=maxPositionX+paddingX;var minTargetX=minPositionX-paddingX;var maxTargetY=maxPositionY+paddingY;var minTargetY=minPositionY-paddingY;var startState=contextInstance.transformState;var startTime=(new Date).getTime();handleSetupAnimation(contextInstance,animationType,finalAnimationTime,(function(step){var _a=contextInstance.transformState,scale=_a.scale,positionX=_a.positionX,positionY=_a.positionY;var frameTime=(new Date).getTime()-startTime;var animationProgress=frameTime/alignAnimationTime;var alignAnimation=animations[alignmentAnimation.animationType];var alignStep=1-alignAnimation(Math.min(1,animationProgress));var customStep=1-step;var newPositionX=positionX+velocityX*customStep;var newPositionY=positionY+velocityY*customStep;var currentPositionX=getVelocityPosition(newPositionX,startState.positionX,positionX,lockAxisX,limitToBounds,minPositionX,maxPositionX,minTargetX,maxTargetX,alignStep);var currentPositionY=getVelocityPosition(newPositionY,startState.positionY,positionY,lockAxisY,limitToBounds,minPositionY,maxPositionY,minTargetY,maxTargetY,alignStep);if(positionX!==newPositionX||positionY!==newPositionY){contextInstance.setTransformState(scale,currentPositionX,currentPositionY)}}))}function handlePanningStart(contextInstance,event){var scale=contextInstance.transformState.scale;handleCancelAnimation(contextInstance);handleCalculateBounds(contextInstance,scale);if(window.TouchEvent!==void 0&&event instanceof TouchEvent){handleTouchPanningSetup(contextInstance,event)}else{handlePanningSetup(contextInstance,event)}}function handleAlignToBounds(contextInstance){var scale=contextInstance.transformState.scale;var _a=contextInstance.setup,minScale=_a.minScale,alignmentAnimation=_a.alignmentAnimation;var disabled=alignmentAnimation.disabled,sizeX=alignmentAnimation.sizeX,sizeY=alignmentAnimation.sizeY,animationTime=alignmentAnimation.animationTime,animationType=alignmentAnimation.animationType;var isDisabled=disabled||scale<minScale||!sizeX&&!sizeY;if(isDisabled)return;var targetState=handlePanToBounds(contextInstance);if(targetState){animate(contextInstance,targetState,animationTime,animationType)}}function handlePanning(contextInstance,clientX,clientY){var startCoords=contextInstance.startCoords,setup=contextInstance.setup;var _a=setup.alignmentAnimation,sizeX=_a.sizeX,sizeY=_a.sizeY;if(!startCoords)return;var _b=getPanningClientPosition(contextInstance,clientX,clientY),x=_b.x,y=_b.y;var paddingValueX=getPaddingValue(contextInstance,sizeX);var paddingValueY=getPaddingValue(contextInstance,sizeY);handleCalculateVelocity(contextInstance,{x:x,y:y});handleNewPosition(contextInstance,x,y,paddingValueX,paddingValueY)}function handlePanningEnd(contextInstance){if(contextInstance.isPanning){var velocityDisabled=contextInstance.setup.panning.velocityDisabled;var velocity=contextInstance.velocity,wrapperComponent=contextInstance.wrapperComponent,contentComponent=contextInstance.contentComponent;contextInstance.isPanning=false;contextInstance.animate=false;contextInstance.animation=null;var wrapperRect=wrapperComponent===null||wrapperComponent===void 0?void 0:wrapperComponent.getBoundingClientRect();var contentRect=contentComponent===null||contentComponent===void 0?void 0:contentComponent.getBoundingClientRect();var wrapperWidth=(wrapperRect===null||wrapperRect===void 0?void 0:wrapperRect.width)||0;var wrapperHeight=(wrapperRect===null||wrapperRect===void 0?void 0:wrapperRect.height)||0;var contentWidth=(contentRect===null||contentRect===void 0?void 0:contentRect.width)||0;var contentHeight=(contentRect===null||contentRect===void 0?void 0:contentRect.height)||0;var isZoomed=wrapperWidth<contentWidth||wrapperHeight<contentHeight;var shouldAnimate=!velocityDisabled&&velocity&&(velocity===null||velocity===void 0?void 0:velocity.total)>.1&&isZoomed;if(shouldAnimate){handleVelocityPanning(contextInstance)}else{handleAlignToBounds(contextInstance)}}}function handleZoomToPoint(contextInstance,scale,mouseX,mouseY){var _a=contextInstance.setup,minScale=_a.minScale,maxScale=_a.maxScale,limitToBounds=_a.limitToBounds;var newScale=checkZoomBounds(roundNumber(scale,2),minScale,maxScale,0,false);var bounds=handleCalculateBounds(contextInstance,newScale);var _b=handleCalculateZoomPositions(contextInstance,mouseX,mouseY,newScale,bounds,limitToBounds),x=_b.x,y=_b.y;return{scale:newScale,positionX:x,positionY:y}}function handleAlignToScaleBounds(contextInstance,mousePositionX,mousePositionY){var scale=contextInstance.transformState.scale;var wrapperComponent=contextInstance.wrapperComponent;var _a=contextInstance.setup,minScale=_a.minScale,limitToBounds=_a.limitToBounds,zoomAnimation=_a.zoomAnimation;var disabled=zoomAnimation.disabled,animationTime=zoomAnimation.animationTime,animationType=zoomAnimation.animationType;var isDisabled=disabled||scale>=minScale;if(scale>=1||limitToBounds){handleAlignToBounds(contextInstance)}if(isDisabled||!wrapperComponent||!contextInstance.mounted)return;var mouseX=mousePositionX||wrapperComponent.offsetWidth/2;var mouseY=mousePositionY||wrapperComponent.offsetHeight/2;var targetState=handleZoomToPoint(contextInstance,minScale,mouseX,mouseY);if(targetState){animate(contextInstance,targetState,animationTime,animationType)}}var __assign=function(){__assign=Object.assign||function __assign2(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p]}return t};return __assign.apply(this,arguments)};function __spreadArray(to,from,pack){for(var i=0,l=from.length,ar;i<l;i++){if(ar||!(i in from)){if(!ar)ar=Array.prototype.slice.call(from,0,i);ar[i]=from[i]}}return to.concat(ar||Array.prototype.slice.call(from))}var initialState={previousScale:1,scale:1,positionX:0,positionY:0};var initialSetup={disabled:false,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:true,centerZoomedOut:false,centerOnInit:false,disablePadding:false,wheel:{step:.2,disabled:false,wheelDisabled:false,touchPadDisabled:false,activationKeys:[],excluded:[]},panning:{disabled:false,velocityDisabled:false,lockAxisX:false,lockAxisY:false,activationKeys:[],excluded:[]},pinch:{step:5,disabled:false,excluded:[]},doubleClick:{disabled:false,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:false,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:false,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:false,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:true}};var createState=function(props){var _a,_b,_c,_d;return{previousScale:(_a=props.initialScale)!==null&&_a!==void 0?_a:initialState.scale,scale:(_b=props.initialScale)!==null&&_b!==void 0?_b:initialState.scale,positionX:(_c=props.initialPositionX)!==null&&_c!==void 0?_c:initialState.positionX,positionY:(_d=props.initialPositionY)!==null&&_d!==void 0?_d:initialState.positionY}};var createSetup=function(props){var newSetup=__assign({},initialSetup);Object.keys(props).forEach((function(key){var validValue=typeof props[key]!=="undefined";var validParameter=typeof initialSetup[key]!=="undefined";if(validParameter&&validValue){var dataType=Object.prototype.toString.call(initialSetup[key]);var isObject2=dataType==="[object Object]";var isArray=dataType==="[object Array]";if(isObject2){newSetup[key]=__assign(__assign({},initialSetup[key]),props[key])}else if(isArray){newSetup[key]=__spreadArray(__spreadArray([],initialSetup[key],true),props[key])}else{newSetup[key]=props[key]}}}));return newSetup};var handleCalculateButtonZoom=function(contextInstance,delta,step){var scale=contextInstance.transformState.scale;var wrapperComponent=contextInstance.wrapperComponent,setup=contextInstance.setup;var maxScale=setup.maxScale,minScale=setup.minScale,zoomAnimation=setup.zoomAnimation;var size=zoomAnimation.size;if(!wrapperComponent){throw new Error("Wrapper is not mounted")}var targetScale=scale*Math.exp(delta*step);var newScale=checkZoomBounds(roundNumber(targetScale,3),minScale,maxScale,size,false);return newScale};function handleZoomToViewCenter(contextInstance,delta,step,animationTime,animationType){var wrapperComponent=contextInstance.wrapperComponent;var _a=contextInstance.transformState,scale=_a.scale,positionX=_a.positionX,positionY=_a.positionY;if(!wrapperComponent)return console.error("No WrapperComponent found");var wrapperWidth=wrapperComponent.offsetWidth;var wrapperHeight=wrapperComponent.offsetHeight;var mouseX=(wrapperWidth/2-positionX)/scale;var mouseY=(wrapperHeight/2-positionY)/scale;var newScale=handleCalculateButtonZoom(contextInstance,delta,step);var targetState=handleZoomToPoint(contextInstance,newScale,mouseX,mouseY);if(!targetState){return console.error("Error during zoom event. New transformation state was not calculated.")}animate(contextInstance,targetState,animationTime,animationType)}function resetTransformations(contextInstance,animationTime,animationType,onResetTransformation){var setup=contextInstance.setup,wrapperComponent=contextInstance.wrapperComponent;var limitToBounds=setup.limitToBounds;var initialTransformation=createState(contextInstance.props);var _a=contextInstance.transformState,scale=_a.scale,positionX=_a.positionX,positionY=_a.positionY;if(!wrapperComponent)return;var newBounds=calculateBounds(contextInstance,initialTransformation.scale);var boundedPositions=getMouseBoundedPosition(initialTransformation.positionX,initialTransformation.positionY,newBounds,limitToBounds,0,0,wrapperComponent);var newState={scale:initialTransformation.scale,positionX:boundedPositions.x,positionY:boundedPositions.y};if(scale===initialTransformation.scale&&positionX===initialTransformation.positionX&&positionY===initialTransformation.positionY){return}onResetTransformation===null||onResetTransformation===void 0?void 0:onResetTransformation();animate(contextInstance,newState,animationTime,animationType)}function getOffset(element,wrapper,content,state){var offset2=element.getBoundingClientRect();var wrapperOffset=wrapper.getBoundingClientRect();var contentOffset=content.getBoundingClientRect();var xOff=wrapperOffset.x*state.scale;var yOff=wrapperOffset.y*state.scale;return{x:(offset2.x-contentOffset.x+xOff)/state.scale,y:(offset2.y-contentOffset.y+yOff)/state.scale}}function calculateZoomToNode(contextInstance,node,customZoom){var wrapperComponent=contextInstance.wrapperComponent,contentComponent=contextInstance.contentComponent,transformState=contextInstance.transformState;var _a=contextInstance.setup,limitToBounds=_a.limitToBounds,minScale=_a.minScale,maxScale=_a.maxScale;if(!wrapperComponent||!contentComponent)return transformState;var wrapperRect=wrapperComponent.getBoundingClientRect();var nodeRect=node.getBoundingClientRect();var nodeOffset=getOffset(node,wrapperComponent,contentComponent,transformState);var nodeLeft=nodeOffset.x;var nodeTop=nodeOffset.y;var nodeWidth=nodeRect.width/transformState.scale;var nodeHeight=nodeRect.height/transformState.scale;var scaleX=wrapperComponent.offsetWidth/nodeWidth;var scaleY=wrapperComponent.offsetHeight/nodeHeight;var newScale=checkZoomBounds(customZoom||Math.min(scaleX,scaleY),minScale,maxScale,0,false);var offsetX=(wrapperRect.width-nodeWidth*newScale)/2;var offsetY=(wrapperRect.height-nodeHeight*newScale)/2;var newPositionX=(wrapperRect.left-nodeLeft)*newScale+offsetX;var newPositionY=(wrapperRect.top-nodeTop)*newScale+offsetY;var bounds=calculateBounds(contextInstance,newScale);var _b=getMouseBoundedPosition(newPositionX,newPositionY,bounds,limitToBounds,0,0,wrapperComponent),x=_b.x,y=_b.y;return{positionX:x,positionY:y,scale:newScale}}var zoomIn=function(contextInstance){return function(step,animationTime,animationType){if(step===void 0){step=.5}if(animationTime===void 0){animationTime=300}if(animationType===void 0){animationType="easeOut"}handleZoomToViewCenter(contextInstance,1,step,animationTime,animationType)}};var zoomOut=function(contextInstance){return function(step,animationTime,animationType){if(step===void 0){step=.5}if(animationTime===void 0){animationTime=300}if(animationType===void 0){animationType="easeOut"}handleZoomToViewCenter(contextInstance,-1,step,animationTime,animationType)}};var setTransform=function(contextInstance){return function(newPositionX,newPositionY,newScale,animationTime,animationType){if(animationTime===void 0){animationTime=300}if(animationType===void 0){animationType="easeOut"}var _a=contextInstance.transformState,positionX=_a.positionX,positionY=_a.positionY,scale=_a.scale;var wrapperComponent=contextInstance.wrapperComponent,contentComponent=contextInstance.contentComponent;var disabled=contextInstance.setup.disabled;if(disabled||!wrapperComponent||!contentComponent)return;var targetState={positionX:Number.isNaN(newPositionX)?positionX:newPositionX,positionY:Number.isNaN(newPositionY)?positionY:newPositionY,scale:Number.isNaN(newScale)?scale:newScale};animate(contextInstance,targetState,animationTime,animationType)}};var resetTransform=function(contextInstance){return function(animationTime,animationType){if(animationTime===void 0){animationTime=200}if(animationType===void 0){animationType="easeOut"}resetTransformations(contextInstance,animationTime,animationType)}};var centerView=function(contextInstance){return function(scale,animationTime,animationType){if(animationTime===void 0){animationTime=200}if(animationType===void 0){animationType="easeOut"}var transformState=contextInstance.transformState,wrapperComponent=contextInstance.wrapperComponent,contentComponent=contextInstance.contentComponent;if(wrapperComponent&&contentComponent){var targetState=getCenterPosition(scale||transformState.scale,wrapperComponent,contentComponent);animate(contextInstance,targetState,animationTime,animationType)}}};var zoomToElement=function(contextInstance){return function(node,scale,animationTime,animationType){if(animationTime===void 0){animationTime=600}if(animationType===void 0){animationType="easeOut"}handleCancelAnimation(contextInstance);var wrapperComponent=contextInstance.wrapperComponent;var target=typeof node==="string"?document.getElementById(node):node;if(wrapperComponent&&target&&wrapperComponent.contains(target)){var targetState=calculateZoomToNode(contextInstance,target,scale);animate(contextInstance,targetState,animationTime,animationType)}}};var getContext=function(contextInstance){return{instance:contextInstance,state:contextInstance.transformState,zoomIn:zoomIn(contextInstance),zoomOut:zoomOut(contextInstance),setTransform:setTransform(contextInstance),resetTransform:resetTransform(contextInstance),centerView:centerView(contextInstance),zoomToElement:zoomToElement(contextInstance)}};var passiveSupported=false;function makePassiveEventOption(){try{var options={get passive(){passiveSupported=true;return false}};return options}catch(err){passiveSupported=false;return passiveSupported}}var isExcludedNode=function(node,excluded){var targetTagName=node.tagName.toUpperCase();var isExcludedTag=excluded.find((function(tag){return tag.toUpperCase()===targetTagName}));if(isExcludedTag)return true;var isExcludedClassName=excluded.find((function(className){return node.classList.contains(className)}));if(isExcludedClassName)return true;return false};var cancelTimeout=function(timeout){if(timeout){clearTimeout(timeout)}};var getTransformStyles=function(x,y,scale){return"translate(".concat(x,"px, ").concat(y,"px) scale(").concat(scale,")")};var getCenterPosition=function(scale,wrapperComponent,contentComponent){var contentWidth=contentComponent.offsetWidth*scale;var contentHeight=contentComponent.offsetHeight*scale;var centerPositionX=(wrapperComponent.offsetWidth-contentWidth)/2;var centerPositionY=(wrapperComponent.offsetHeight-contentHeight)/2;return{scale:scale,positionX:centerPositionX,positionY:centerPositionY}};function mergeRefs(refs){return function(value){refs.forEach((function(ref){if(typeof ref==="function"){ref(value)}else if(ref!=null){ref.current=value}}))}}var isWheelAllowed=function(contextInstance,event){var _a=contextInstance.setup.wheel,disabled=_a.disabled,wheelDisabled=_a.wheelDisabled,touchPadDisabled=_a.touchPadDisabled,excluded=_a.excluded;var isInitialized=contextInstance.isInitialized,isPanning=contextInstance.isPanning;var target=event.target;var isAllowed=isInitialized&&!isPanning&&!disabled&⌖if(!isAllowed)return false;if(wheelDisabled&&!event.ctrlKey)return false;if(touchPadDisabled&&event.ctrlKey)return false;var isExcluded=isExcludedNode(target,excluded);if(isExcluded)return false;return true};var getDeltaY=function(event){if(event){return event.deltaY<0?1:-1}return 0};function getDelta(event,customDelta){var deltaY=getDeltaY(event);var delta=checkIsNumber(customDelta,deltaY);return delta}function getMousePosition(event,contentComponent,scale){var contentRect=contentComponent.getBoundingClientRect();var mouseX=0;var mouseY=0;if("clientX"in event){mouseX=(event.clientX-contentRect.left)/scale;mouseY=(event.clientY-contentRect.top)/scale}else{var touch=event.touches[0];mouseX=(touch.clientX-contentRect.left)/scale;mouseY=(touch.clientY-contentRect.top)/scale}if(Number.isNaN(mouseX)||Number.isNaN(mouseY))console.error("No mouse or touch offset found");return{x:mouseX,y:mouseY}}var handleCalculateWheelZoom=function(contextInstance,delta,step,disable,getTarget){var scale=contextInstance.transformState.scale;var wrapperComponent=contextInstance.wrapperComponent,setup=contextInstance.setup;var maxScale=setup.maxScale,minScale=setup.minScale,zoomAnimation=setup.zoomAnimation,disablePadding=setup.disablePadding;var size=zoomAnimation.size,disabled=zoomAnimation.disabled;if(!wrapperComponent){throw new Error("Wrapper is not mounted")}var targetScale=scale+delta*(scale-scale*step)*step;var paddingEnabled=disable?false:!disabled;var newScale=checkZoomBounds(roundNumber(targetScale,3),minScale,maxScale,size,paddingEnabled&&!disablePadding);return newScale};var handleWheelZoomStop=function(contextInstance,event){var previousWheelEvent=contextInstance.previousWheelEvent;var scale=contextInstance.transformState.scale;var _a=contextInstance.setup,maxScale=_a.maxScale,minScale=_a.minScale;if(!previousWheelEvent)return false;if(scale<maxScale||scale>minScale)return true;if(Math.sign(previousWheelEvent.deltaY)!==Math.sign(event.deltaY))return true;if(previousWheelEvent.deltaY>0&&previousWheelEvent.deltaY<event.deltaY)return true;if(previousWheelEvent.deltaY<0&&previousWheelEvent.deltaY>event.deltaY)return true;if(Math.sign(previousWheelEvent.deltaY)!==Math.sign(event.deltaY))return true;return false};var isPinchStartAllowed=function(contextInstance,event){var _a=contextInstance.setup.pinch,disabled=_a.disabled,excluded=_a.excluded;var isInitialized=contextInstance.isInitialized;var target=event.target;var isAllowed=isInitialized&&!disabled&⌖if(!isAllowed)return false;var isExcluded=isExcludedNode(target,excluded);if(isExcluded)return false;return true};var isPinchAllowed=function(contextInstance){var disabled=contextInstance.setup.pinch.disabled;var isInitialized=contextInstance.isInitialized,pinchStartDistance=contextInstance.pinchStartDistance;var isAllowed=isInitialized&&!disabled&&pinchStartDistance;if(!isAllowed)return false;return true};var calculateTouchMidPoint=function(event,scale,contentComponent){var contentRect=contentComponent.getBoundingClientRect();var touches=event.touches;var firstPointX=roundNumber(touches[0].clientX-contentRect.left,5);var firstPointY=roundNumber(touches[0].clientY-contentRect.top,5);var secondPointX=roundNumber(touches[1].clientX-contentRect.left,5);var secondPointY=roundNumber(touches[1].clientY-contentRect.top,5);return{x:(firstPointX+secondPointX)/2/scale,y:(firstPointY+secondPointY)/2/scale}};var getTouchDistance=function(event){return Math.sqrt(Math.pow(event.touches[0].pageX-event.touches[1].pageX,2)+Math.pow(event.touches[0].pageY-event.touches[1].pageY,2))};var calculatePinchZoom=function(contextInstance,currentDistance){var pinchStartScale=contextInstance.pinchStartScale,pinchStartDistance=contextInstance.pinchStartDistance,setup=contextInstance.setup;var maxScale=setup.maxScale,minScale=setup.minScale,zoomAnimation=setup.zoomAnimation,disablePadding=setup.disablePadding;var size=zoomAnimation.size,disabled=zoomAnimation.disabled;if(!pinchStartScale||pinchStartDistance===null||!currentDistance){throw new Error("Pinch touches distance was not provided")}if(currentDistance<0){return contextInstance.transformState.scale}var touchProportion=currentDistance/pinchStartDistance;var scaleDifference=touchProportion*pinchStartScale;return checkZoomBounds(roundNumber(scaleDifference,2),minScale,maxScale,size,!disabled&&!disablePadding)};var wheelStopEventTime=160;var wheelAnimationTime=100;var handleWheelStart=function(contextInstance,event){var _a=contextInstance.props,onWheelStart=_a.onWheelStart,onZoomStart=_a.onZoomStart;if(!contextInstance.wheelStopEventTimer){handleCancelAnimation(contextInstance);handleCallback(getContext(contextInstance),event,onWheelStart);handleCallback(getContext(contextInstance),event,onZoomStart)}};var handleWheelZoom=function(contextInstance,event){var _a=contextInstance.props,onWheel=_a.onWheel,onZoom=_a.onZoom;var contentComponent=contextInstance.contentComponent,setup=contextInstance.setup,transformState=contextInstance.transformState;var scale=transformState.scale;var limitToBounds=setup.limitToBounds,centerZoomedOut=setup.centerZoomedOut,zoomAnimation=setup.zoomAnimation,wheel=setup.wheel,disablePadding=setup.disablePadding;var size=zoomAnimation.size,disabled=zoomAnimation.disabled;var step=wheel.step;if(!contentComponent){throw new Error("Component not mounted")}event.preventDefault();event.stopPropagation();var delta=getDelta(event,null);var newScale=handleCalculateWheelZoom(contextInstance,delta,step,!event.ctrlKey);if(scale===newScale)return;var bounds=handleCalculateBounds(contextInstance,newScale);var mousePosition=getMousePosition(event,contentComponent,scale);var isPaddingDisabled=disabled||size===0||centerZoomedOut||disablePadding;var isLimitedToBounds=limitToBounds&&isPaddingDisabled;var _b=handleCalculateZoomPositions(contextInstance,mousePosition.x,mousePosition.y,newScale,bounds,isLimitedToBounds),x=_b.x,y=_b.y;contextInstance.previousWheelEvent=event;contextInstance.setTransformState(newScale,x,y);handleCallback(getContext(contextInstance),event,onWheel);handleCallback(getContext(contextInstance),event,onZoom)};var handleWheelStop=function(contextInstance,event){var _a=contextInstance.props,onWheelStop=_a.onWheelStop,onZoomStop=_a.onZoomStop;cancelTimeout(contextInstance.wheelAnimationTimer);contextInstance.wheelAnimationTimer=setTimeout((function(){if(!contextInstance.mounted)return;handleAlignToScaleBounds(contextInstance,event.x,event.y);contextInstance.wheelAnimationTimer=null}),wheelAnimationTime);var hasStoppedZooming=handleWheelZoomStop(contextInstance,event);if(hasStoppedZooming){cancelTimeout(contextInstance.wheelStopEventTimer);contextInstance.wheelStopEventTimer=setTimeout((function(){if(!contextInstance.mounted)return;contextInstance.wheelStopEventTimer=null;handleCallback(getContext(contextInstance),event,onWheelStop);handleCallback(getContext(contextInstance),event,onZoomStop)}),wheelStopEventTime)}};var handlePinchStart=function(contextInstance,event){var distance=getTouchDistance(event);contextInstance.pinchStartDistance=distance;contextInstance.lastDistance=distance;contextInstance.pinchStartScale=contextInstance.transformState.scale;contextInstance.isPanning=false;handleCancelAnimation(contextInstance)};var handlePinchZoom=function(contextInstance,event){var contentComponent=contextInstance.contentComponent,pinchStartDistance=contextInstance.pinchStartDistance;var scale=contextInstance.transformState.scale;var _a=contextInstance.setup,limitToBounds=_a.limitToBounds,centerZoomedOut=_a.centerZoomedOut,zoomAnimation=_a.zoomAnimation;var disabled=zoomAnimation.disabled,size=zoomAnimation.size;if(pinchStartDistance===null||!contentComponent)return;var midPoint=calculateTouchMidPoint(event,scale,contentComponent);if(!Number.isFinite(midPoint.x)||!Number.isFinite(midPoint.y))return;var currentDistance=getTouchDistance(event);var newScale=calculatePinchZoom(contextInstance,currentDistance);if(newScale===scale)return;var bounds=handleCalculateBounds(contextInstance,newScale);var isPaddingDisabled=disabled||size===0||centerZoomedOut;var isLimitedToBounds=limitToBounds&&isPaddingDisabled;var _b=handleCalculateZoomPositions(contextInstance,midPoint.x,midPoint.y,newScale,bounds,isLimitedToBounds),x=_b.x,y=_b.y;contextInstance.pinchMidpoint=midPoint;contextInstance.lastDistance=currentDistance;contextInstance.setTransformState(newScale,x,y)};var handlePinchStop=function(contextInstance){var pinchMidpoint=contextInstance.pinchMidpoint;contextInstance.velocity=null;contextInstance.lastDistance=null;contextInstance.pinchMidpoint=null;contextInstance.pinchStartScale=null;contextInstance.pinchStartDistance=null;handleAlignToScaleBounds(contextInstance,pinchMidpoint===null||pinchMidpoint===void 0?void 0:pinchMidpoint.x,pinchMidpoint===null||pinchMidpoint===void 0?void 0:pinchMidpoint.y)};var handleDoubleClickStop=function(contextInstance,event){var onZoomStop=contextInstance.props.onZoomStop;var animationTime=contextInstance.setup.doubleClick.animationTime;cancelTimeout(contextInstance.doubleClickStopEventTimer);contextInstance.doubleClickStopEventTimer=setTimeout((function(){contextInstance.doubleClickStopEventTimer=null;handleCallback(getContext(contextInstance),event,onZoomStop)}),animationTime)};var handleDoubleClickResetMode=function(contextInstance,event){var _a=contextInstance.props,onZoomStart=_a.onZoomStart,onZoom=_a.onZoom;var _b=contextInstance.setup.doubleClick,animationTime=_b.animationTime,animationType=_b.animationType;handleCallback(getContext(contextInstance),event,onZoomStart);resetTransformations(contextInstance,animationTime,animationType,(function(){return handleCallback(getContext(contextInstance),event,onZoom)}));handleDoubleClickStop(contextInstance,event)};function handleDoubleClick(contextInstance,event){var setup=contextInstance.setup,doubleClickStopEventTimer=contextInstance.doubleClickStopEventTimer,transformState=contextInstance.transformState,contentComponent=contextInstance.contentComponent;var scale=transformState.scale;var _a=contextInstance.props,onZoomStart=_a.onZoomStart,onZoom=_a.onZoom;var _b=setup.doubleClick,disabled=_b.disabled,mode=_b.mode,step=_b.step,animationTime=_b.animationTime,animationType=_b.animationType;if(disabled)return;if(doubleClickStopEventTimer)return;if(mode==="reset"){return handleDoubleClickResetMode(contextInstance,event)}if(!contentComponent)return console.error("No ContentComponent found");var delta=mode==="zoomOut"?-1:1;var newScale=handleCalculateButtonZoom(contextInstance,delta,step);if(scale===newScale)return;handleCallback(getContext(contextInstance),event,onZoomStart);var mousePosition=getMousePosition(event,contentComponent,scale);var targetState=handleZoomToPoint(contextInstance,newScale,mousePosition.x,mousePosition.y);if(!targetState){return console.error("Error during zoom event. New transformation state was not calculated.")}handleCallback(getContext(contextInstance),event,onZoom);animate(contextInstance,targetState,animationTime,animationType);handleDoubleClickStop(contextInstance,event)}var isDoubleClickAllowed=function(contextInstance,event){var isInitialized=contextInstance.isInitialized,setup=contextInstance.setup,wrapperComponent=contextInstance.wrapperComponent;var _a=setup.doubleClick,disabled=_a.disabled,excluded=_a.excluded;var target=event.target;var isWrapperChild=wrapperComponent===null||wrapperComponent===void 0?void 0:wrapperComponent.contains(target);var isAllowed=isInitialized&&target&&isWrapperChild&&!disabled;if(!isAllowed)return false;var isExcluded=isExcludedNode(target,excluded);if(isExcluded)return false;return true};var ZoomPanPinch=function(){function ZoomPanPinch2(props){var _this=this;this.mounted=true;this.onChangeCallbacks=new Set;this.wrapperComponent=null;this.contentComponent=null;this.isInitialized=false;this.bounds=null;this.previousWheelEvent=null;this.wheelStopEventTimer=null;this.wheelAnimationTimer=null;this.isPanning=false;this.startCoords=null;this.lastTouch=null;this.distance=null;this.lastDistance=null;this.pinchStartDistance=null;this.pinchStartScale=null;this.pinchMidpoint=null;this.doubleClickStopEventTimer=null;this.velocity=null;this.velocityTime=null;this.lastMousePosition=null;this.animate=false;this.animation=null;this.maxBounds=null;this.pressedKeys={};this.mount=function(){_this.initializeWindowEvents()};this.unmount=function(){_this.cleanupWindowEvents()};this.update=function(newProps){handleCalculateBounds(_this,_this.transformState.scale);_this.setup=createSetup(newProps)};this.initializeWindowEvents=function(){var _a;var passive=makePassiveEventOption();var currentDocument=(_a=_this.wrapperComponent)===null||_a===void 0?void 0:_a.ownerDocument;var currentWindow=currentDocument===null||currentDocument===void 0?void 0:currentDocument.defaultView;currentWindow===null||currentWindow===void 0?void 0:currentWindow.addEventListener("mousedown",_this.onPanningStart,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.addEventListener("mousemove",_this.onPanning,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.addEventListener("mouseup",_this.onPanningStop,passive);currentDocument===null||currentDocument===void 0?void 0:currentDocument.addEventListener("mouseleave",_this.clearPanning,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.addEventListener("keyup",_this.setKeyUnPressed,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.addEventListener("keydown",_this.setKeyPressed,passive)};this.cleanupWindowEvents=function(){var _a,_b;var passive=makePassiveEventOption();var currentDocument=(_a=_this.wrapperComponent)===null||_a===void 0?void 0:_a.ownerDocument;var currentWindow=currentDocument===null||currentDocument===void 0?void 0:currentDocument.defaultView;currentWindow===null||currentWindow===void 0?void 0:currentWindow.removeEventListener("mousedown",_this.onPanningStart,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.removeEventListener("mousemove",_this.onPanning,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.removeEventListener("mouseup",_this.onPanningStop,passive);currentDocument===null||currentDocument===void 0?void 0:currentDocument.removeEventListener("mouseleave",_this.clearPanning,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.removeEventListener("keyup",_this.setKeyUnPressed,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.removeEventListener("keydown",_this.setKeyPressed,passive);document.removeEventListener("mouseleave",_this.clearPanning,passive);handleCancelAnimation(_this);(_b=_this.observer)===null||_b===void 0?void 0:_b.disconnect()};this.handleInitializeWrapperEvents=function(wrapper){var passive=makePassiveEventOption();wrapper.addEventListener("wheel",_this.onWheelZoom,passive);wrapper.addEventListener("dblclick",_this.onDoubleClick,passive);wrapper.addEventListener("touchstart",_this.onTouchPanningStart,passive);wrapper.addEventListener("touchmove",_this.onTouchPanning,passive);wrapper.addEventListener("touchend",_this.onTouchPanningStop,passive)};this.handleInitialize=function(contentComponent){var centerOnInit=_this.setup.centerOnInit;_this.applyTransformation();if(centerOnInit){_this.setCenter();_this.observer=new ResizeObserver((function(){var _a;_this.setCenter();(_a=_this.observer)===null||_a===void 0?void 0:_a.disconnect()}));_this.observer.observe(contentComponent)}};this.onWheelZoom=function(event){var disabled=_this.setup.disabled;if(disabled)return;var isAllowed=isWheelAllowed(_this,event);if(!isAllowed)return;var keysPressed=_this.isPressingKeys(_this.setup.wheel.activationKeys);if(!keysPressed)return;handleWheelStart(_this,event);handleWheelZoom(_this,event);handleWheelStop(_this,event)};this.onPanningStart=function(event){var disabled=_this.setup.disabled;var onPanningStart=_this.props.onPanningStart;if(disabled)return;var isAllowed=isPanningStartAllowed(_this,event);if(!isAllowed)return;var keysPressed=_this.isPressingKeys(_this.setup.panning.activationKeys);if(!keysPressed)return;event.preventDefault();event.stopPropagation();handleCancelAnimation(_this);handlePanningStart(_this,event);handleCallback(getContext(_this),event,onPanningStart)};this.onPanning=function(event){var disabled=_this.setup.disabled;var onPanning=_this.props.onPanning;if(disabled)return;var isAllowed=isPanningAllowed(_this);if(!isAllowed)return;var keysPressed=_this.isPressingKeys(_this.setup.panning.activationKeys);if(!keysPressed)return;event.preventDefault();event.stopPropagation();handlePanning(_this,event.clientX,event.clientY);handleCallback(getContext(_this),event,onPanning)};this.onPanningStop=function(event){var onPanningStop=_this.props.onPanningStop;if(_this.isPanning){handlePanningEnd(_this);handleCallback(getContext(_this),event,onPanningStop)}};this.onPinchStart=function(event){var disabled=_this.setup.disabled;var _a=_this.props,onPinchingStart=_a.onPinchingStart,onZoomStart=_a.onZoomStart;if(disabled)return;var isAllowed=isPinchStartAllowed(_this,event);if(!isAllowed)return;handlePinchStart(_this,event);handleCancelAnimation(_this);handleCallback(getContext(_this),event,onPinchingStart);handleCallback(getContext(_this),event,onZoomStart)};this.onPinch=function(event){var disabled=_this.setup.disabled;var _a=_this.props,onPinching=_a.onPinching,onZoom=_a.onZoom;if(disabled)return;var isAllowed=isPinchAllowed(_this);if(!isAllowed)return;event.preventDefault();event.stopPropagation();handlePinchZoom(_this,event);handleCallback(getContext(_this),event,onPinching);handleCallback(getContext(_this),event,onZoom)};this.onPinchStop=function(event){var _a=_this.props,onPinchingStop=_a.onPinchingStop,onZoomStop=_a.onZoomStop;if(_this.pinchStartScale){handlePinchStop(_this);handleCallback(getContext(_this),event,onPinchingStop);handleCallback(getContext(_this),event,onZoomStop)}};this.onTouchPanningStart=function(event){var disabled=_this.setup.disabled;var onPanningStart=_this.props.onPanningStart;if(disabled)return;var isAllowed=isPanningStartAllowed(_this,event);if(!isAllowed)return;var isDoubleTap=_this.lastTouch&&+new Date-_this.lastTouch<200;if(isDoubleTap&&event.touches.length===1){_this.onDoubleClick(event)}else{_this.lastTouch=+new Date;handleCancelAnimation(_this);var touches=event.touches;var isPanningAction=touches.length===1;var isPinchAction=touches.length===2;if(isPanningAction){handleCancelAnimation(_this);handlePanningStart(_this,event);handleCallback(getContext(_this),event,onPanningStart)}if(isPinchAction){_this.onPinchStart(event)}}};this.onTouchPanning=function(event){var disabled=_this.setup.disabled;var onPanning=_this.props.onPanning;if(_this.isPanning&&event.touches.length===1){if(disabled)return;var isAllowed=isPanningAllowed(_this);if(!isAllowed)return;event.preventDefault();event.stopPropagation();var touch=event.touches[0];handlePanning(_this,touch.clientX,touch.clientY);handleCallback(getContext(_this),event,onPanning)}else if(event.touches.length>1){_this.onPinch(event)}};this.onTouchPanningStop=function(event){_this.onPanningStop(event);_this.onPinchStop(event)};this.onDoubleClick=function(event){var disabled=_this.setup.disabled;if(disabled)return;var isAllowed=isDoubleClickAllowed(_this,event);if(!isAllowed)return;handleDoubleClick(_this,event)};this.clearPanning=function(event){if(_this.isPanning){_this.onPanningStop(event)}};this.setKeyPressed=function(e){_this.pressedKeys[e.key]=true};this.setKeyUnPressed=function(e){_this.pressedKeys[e.key]=false};this.isPressingKeys=function(keys){if(!keys.length){return true}return Boolean(keys.find((function(key){return _this.pressedKeys[key]})))};this.setTransformState=function(scale,positionX,positionY){var onTransformed=_this.props.onTransformed;if(!Number.isNaN(scale)&&!Number.isNaN(positionX)&&!Number.isNaN(positionY)){if(scale!==_this.transformState.scale){_this.transformState.previousScale=_this.transformState.scale;_this.transformState.scale=scale}_this.transformState.positionX=positionX;_this.transformState.positionY=positionY;var ctx_1=getContext(_this);_this.onChangeCallbacks.forEach((function(callback){return callback(ctx_1)}));handleCallback(ctx_1,{scale:scale,positionX:positionX,positionY:positionY},onTransformed);_this.applyTransformation()}else{console.error("Detected NaN set state values")}};this.setCenter=function(){if(_this.wrapperComponent&&_this.contentComponent){var targetState=getCenterPosition(_this.transformState.scale,_this.wrapperComponent,_this.contentComponent);_this.setTransformState(targetState.scale,targetState.positionX,targetState.positionY)}};this.handleTransformStyles=function(x,y,scale){if(_this.props.customTransform){return _this.props.customTransform(x,y,scale)}return getTransformStyles(x,y,scale)};this.applyTransformation=function(){if(!_this.mounted||!_this.contentComponent)return;var _a=_this.transformState,scale=_a.scale,positionX=_a.positionX,positionY=_a.positionY;var transform=_this.handleTransformStyles(positionX,positionY,scale);_this.contentComponent.style.transform=transform};this.getContext=function(){return getContext(_this)};this.onChange=function(callback){if(!_this.onChangeCallbacks.has(callback)){_this.onChangeCallbacks.add(callback)}return function(){_this.onChangeCallbacks.delete(callback)}};this.init=function(wrapperComponent,contentComponent){_this.cleanupWindowEvents();_this.wrapperComponent=wrapperComponent;_this.contentComponent=contentComponent;handleCalculateBounds(_this,_this.transformState.scale);_this.handleInitializeWrapperEvents(wrapperComponent);_this.handleInitialize(contentComponent);_this.initializeWindowEvents();_this.isInitialized=true;handleCallback(getContext(_this),void 0,_this.props.onInit)};this.props=props;this.setup=createSetup(this.props);this.transformState=createState(this.props)}return ZoomPanPinch2}();var Context=React__default.createContext(null);var getContent=function(children,ctx){if(typeof children==="function"){return children(ctx)}return children};var TransformWrapper=React__default.forwardRef((function(props,ref){var _a=useState(0),forceUpdate=_a[1];var children=props.children;var instance=useRef(new ZoomPanPinch(props)).current;var content=getContent(props.children,getContext(instance));var handleOnChange=useCallback((function(){if(typeof children==="function"){forceUpdate((function(prev){return prev+1}))}}),[children]);useImperativeHandle(ref,(function(){return getContext(instance)}),[instance]);useEffect((function(){instance.update(props)}),[instance,props]);useEffect((function(){return instance.onChange(handleOnChange)}),[instance,props,handleOnChange]);return React__default.createElement(Context.Provider,{value:instance},content)}));function styleInject(css,ref){if(ref===void 0)ref={};var insertAt=ref.insertAt;if(typeof document==="undefined"){return}var head=document.head||document.getElementsByTagName("head")[0];var style=document.createElement("style");style.type="text/css";if(insertAt==="top"){if(head.firstChild){head.insertBefore(style,head.firstChild)}else{head.appendChild(style)}}else{head.appendChild(style)}if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}}var css_248z=".transform-component-module_wrapper__7HFJe {\n position: relative;\n width: -moz-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: fit-content;\n overflow: hidden;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n margin: 0;\n padding: 0;\n}\n.transform-component-module_content__uCDPE {\n display: flex;\n flex-wrap: wrap;\n width: -moz-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: fit-content;\n margin: 0;\n padding: 0;\n transform-origin: 0% 0%;\n}\n.transform-component-module_content__uCDPE img {\n pointer-events: none;\n}\n";var styles={wrapper:"transform-component-module_wrapper__7HFJe",content:"transform-component-module_content__uCDPE"};styleInject(css_248z);var TransformComponent=function(_a){var children=_a.children,_b=_a.wrapperClass,wrapperClass=_b===void 0?"":_b,_c=_a.contentClass,contentClass=_c===void 0?"":_c,wrapperStyle=_a.wrapperStyle,contentStyle=_a.contentStyle,_d=_a.wrapperProps,wrapperProps=_d===void 0?{}:_d,_e=_a.contentProps,contentProps=_e===void 0?{}:_e;var init=useContext(Context).init;var wrapperRef=useRef(null);var contentRef=useRef(null);useEffect((function(){var wrapper=wrapperRef.current;var content=contentRef.current;if(wrapper!==null&&content!==null&&init){init(wrapper,content)}}),[]);return React__default.createElement("div",__assign({},wrapperProps,{ref:wrapperRef,className:"react-transform-wrapper ".concat(styles.wrapper," ").concat(wrapperClass),style:wrapperStyle}),React__default.createElement("div",__assign({},contentProps,{ref:contentRef,className:"react-transform-component ".concat(styles.content," ").concat(contentClass),style:contentStyle}),children))};React__default.forwardRef((function(props,ref){var localRef=useRef(null);var instance=useContext(Context);useEffect((function(){return instance.onChange((function(ctx){if(localRef.current){var positionX=0;var positionY=0;localRef.current.style.transform=instance.handleTransformStyles(positionX,positionY,1/ctx.state.scale)}}))}),[instance]);return React__default.createElement("div",__assign({},props,{ref:mergeRefs([localRef,ref])}))}));function Slide({alt:alt,onClick:onClick=noop$4,onZoom:onZoom=noop$4,url:url,zooming:zooming=false}){const handlePinchingStop=({state:state})=>{const isZooming=state.scale>1;onZoom(isZooming)};return jsx(TransformWrapper,{doubleClick:{mode:"reset"},initialScale:1,onPinchingStop:handlePinchingStop,panning:{disabled:!zooming},children:jsx("button",{className:"Slide",onClick:onClick,onDoubleClick:()=>onZoom(false),tabIndex:-1,children:jsx(TransformComponent,{wrapperClass:"TransformComponent",children:jsx(Image,{alt:alt,url:url,zIndex:3})})})})}function Slides({urls:urls=[],current:current=0,onChange:onChange=noop$4,setIndex:setIndex}){const[zooming,setZooming]=useState(false);const[touchStart,setTouchStart]=useState(null);const[touchEnd,setTouchEnd]=useState(null);const minSwipeDistance=40;const onTouchStart=e=>{setTouchEnd(null);setTouchStart(e.targetTouches[0].clientX)};const onTouchMove=e=>setTouchEnd(e.targetTouches[0].clientX);const onTouchEnd=()=>{if(!touchStart||!touchEnd)return;const distance=touchStart-touchEnd;const isLeftSwipe=distance>minSwipeDistance;const isRightSwipe=distance<-minSwipeDistance;if(isLeftSwipe){setIndex(current<urls.length-1?current+1:urls.length-1)}else if(isRightSwipe){setIndex(current>0?current-1:0)}};const arrowLeft=()=>setIndex(current>0?current-1:0);const arrowRight=()=>setIndex(current<urls.length-1?current+1:urls.length-1);const handleZoom=isZooming=>setZooming(isZooming);return jsxs("div",{className:"Slides",onTouchEnd:onTouchEnd,onTouchMove:onTouchMove,onTouchStart:onTouchStart,children:[urls.length>1&&jsx(CircleIconButton,{className:"carousel-arrow-left",dark:true,icon:"chevron-left",onClick:arrowLeft,variant:"link"}),jsx(Slide,{onClick:()=>onChange(current),onZoom:handleZoom,url:urls[current],zooming:zooming}),urls.length>1&&jsx(CircleIconButton,{className:"carousel-arrow-right",dark:true,icon:"chevron-right",onClick:arrowRight,variant:"link"})]})}const useWindowSize=()=>{const[size,setSize]=useState({width:window.innerWidth,height:window.innerHeight});useEffect((()=>{const handleResize=()=>{setSize({width:window.innerWidth,height:window.innerHeight})};window.addEventListener("resize",handleResize);handleResize();return()=>window.removeEventListener("resize",handleResize)}),[]);return size};function Thumbnail({active:active=false,alt:alt,width:width,url:url,onClick:onClick,buttonRef:buttonRef}){const activeClasses=classnames("Thumbnail",{active:active});return jsx("button",{className:classnames(activeClasses),onClick:onClick,ref:buttonRef,style:{width:width},type:"button",children:jsx(Image,{alt:alt,size:"sm",url:url})})}function Thumbnails({current:current=0,onChange:onChange=noop$4,urls:urls=[]}){const viewportSize=useWindowSize();const thumbnailWidth=viewportSize.width/8;const shouldBeCentered=thumbnailWidth*urls.length<viewportSize.width*.9;const css=classnames("Thumbnails",{centered:shouldBeCentered});const otherProps={};const thumbnailsRef=React__default.createRef();useLayoutEffect((()=>{var _a,_b,_c;if(shouldBeCentered)return;const currentThumbnail=otherProps.buttonRef.current;const thumbWidth=currentThumbnail.clientWidth,scrollLeft=thumbWidth*current,firstThumb=thumbnailsRef.current.querySelector(".Thumbnail:first-child"),lastThumb=thumbnailsRef.current.querySelector(".Thumbnail:last-child");firstThumb.style.marginLeft=`${((_a=thumbnailsRef.current)==null?void 0:_a.clientWidth)/2-thumbWidth/2}px`;lastThumb.style.marginRight=`${((_b=thumbnailsRef.current)==null?void 0:_b.clientWidth)/2-thumbWidth/2}px`;(_c=thumbnailsRef.current)==null?void 0:_c.scrollTo(scrollLeft,0)}));return jsx("div",{className:css,ref:thumbnailsRef,children:urls.map(((url,i)=>{const active=i===current;if(active)otherProps.buttonRef=React__default.createRef();return jsx(Thumbnail,{active:active,alt:i.toString(),onClick:()=>onChange(i),url:url,...otherProps},i)}))})}function Carousel({currentIndex:currentIndex,photos:photos,onClick:onClick,onChange:onChange=()=>void 0,setIndex:setIndex}){useEffect((()=>{document.body.style.overflow="hidden";return()=>{document.body.style.overflow="initial"}}),[]);const handleChange=index=>{onChange(index)};return jsxs("div",{className:"Lightbox",children:[jsx(Slides,{current:currentIndex,onChange:handleChange,onClick:onClick,setIndex:setIndex,urls:photos.map((photo=>photo.url))}),photos.length>1?jsx(Thumbnails,{current:currentIndex,onChange:handleChange,urls:photos.map((photo=>photo.thumbnail))}):null]})}const Lightbox=props=>{const{aria:aria={},children:children,className:className,currentPhotoIndex:currentPhotoIndex,data:data={},description:description,htmlOptions:htmlOptions={},id:id="",initialPhoto:initialPhoto=0,photos:photos,onChange:onChange=()=>void 0,onClose:onClose,onClickRight:onClickRight,icon:icon="times",navRight:navRight,title:title}=props;const[activePhoto,setActivePhoto]=useState(initialPhoto);useEffect((()=>{onChange(activePhoto)}),[activePhoto]);useEffect((()=>{currentPhotoIndex!==void 0&¤tPhotoIndex!==null&&setActivePhoto(currentPhotoIndex)}),[currentPhotoIndex]);const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_lightbox_kit"),globalProps(props),className);const handleOnSlide=photoIndex=>{setActivePhoto(photoIndex)};const photosMap=useMemo((()=>photos.map((photo=>({url:photo,thumbnail:photo})))),[photos]);const api={onClose:onClose,onArrowLeft:()=>{setActivePhoto(activePhoto>0?activePhoto-1:0)},onArrowRight:()=>{const nextPhoto=activePhoto<photos.length-1?activePhoto+1:photos.length-1;setActivePhoto(nextPhoto)}};useKbdControls(api);const lightboxRef=useRef();return jsx(Fragment$1,{children:jsx(LightboxContext.Provider,{value:api,children:jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,ref:lightboxRef,children:jsxs("div",{className:"carousel",children:[jsx(Lightbox.Header,{icon:icon,navRight:navRight,onClickRight:onClickRight,onClose:onClose,text:description,title:title}),children,jsx(Carousel,{currentIndex:activePhoto,onChange:handleOnSlide,photos:photosMap,setIndex:setActivePhoto})]})})})})};Lightbox.Header=LightboxHeader;const MapCustomButton=({onClick:onClick,icon:icon})=>jsx(Button,{className:"pb_map-custom-button",onClick:onClick,children:jsx(Icon,{icon:icon})});const MapControls=({zoomBtns:zoomBtns,zoomInClick:zoomInClick,zoomOutClick:zoomOutClick,flyTo:flyTo,flyToClick:flyToClick,children:children})=>jsxs(Flex,{className:"custom-nav-control",orientation:"column",children:[zoomBtns?jsxs(Fragment,{children:[jsxs("div",{className:"custom-nav-control-zoom",children:[jsx(Button,{className:"map-zoom-in-button",onClick:zoomInClick,children:jsx(Icon,{icon:"plus"})}),jsx(Button,{className:"map-zoom-out-button",onClick:zoomOutClick,children:jsx(Icon,{icon:"minus"})})]}),flyTo?jsx(Button,{className:"map-flyto-button",onClick:flyToClick,children:jsx(Icon,{icon:"eye"})}):null]}):null,children]});const Map$1=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,zoomBtns:zoomBtns=false,flyTo:flyTo=false,zoomInClick:zoomInClick,zoomOutClick:zoomOutClick,flyToClick:flyToClick}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_map"),globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[zoomBtns?jsx(Map$1.Controls,{flyTo:flyTo,flyToClick:flyToClick,zoomBtns:zoomBtns,zoomInClick:zoomInClick,zoomOutClick:zoomOutClick}):null,children]})};Map$1.Controls=MapControls;const Timestamp=props=>{const{align:align="left",aria:aria={},className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},text:text2,timezone:timezone,timestamp:timestamp,showDate:showDate=true,showUser:showUser=false,hideUpdated:hideUpdated=false,showTimezone:showTimezone=false,unstyled:unstyled=false,variant:variant="default"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_timestamp_kit",align,{dark:dark,variant:variant}),globalProps(props),className);const currentYear=(new Date).getFullYear().toString();const dateDisplay=`${DateTime$1.toMonth(timestamp,timezone)} ${DateTime$1.toDay(timestamp,timezone)}`;const shouldShowUser=showUser==true&&text2.length>0;const shouldShowTimezone=showTimezone==true&&timezone.length>0;const updatedText=hideUpdated?"":"Last updated";const userDisplay=shouldShowUser?` by ${text2}`:"";let timeDisplay=`${DateTime$1.toHour(timestamp,timezone)}:${DateTime$1.toMinute(timestamp,timezone)}${DateTime$1.toMeridiem(timestamp,timezone)}`;const fullTimeDisplay=()=>{if(shouldShowTimezone){timeDisplay=`${timeDisplay} ${DateTime$1.toTimeZone(timestamp,timezone)}`}return timeDisplay};const fullDateDisplay=()=>{let fullDisplay=`${DateTime$1.toMonth(timestamp,timezone)} ${DateTime$1.toDay(timestamp,timezone)}`;if(DateTime$1.toYear(timestamp,timezone).toString()!==currentYear){fullDisplay=`${fullDisplay}, ${DateTime$1.toYear(timestamp,timezone)}`}return`${fullDisplay} ${" · "} ${fullTimeDisplay()}`};const formatUpdatedString=()=>`Last updated ${userDisplay} on ${dateDisplay} at ${timeDisplay}`;const formatElapsedString=()=>`${updatedText} ${userDisplay} ${DateTime$1.fromNow(timestamp)}`;const timestampText=()=>{switch(variant){case"updated":return formatUpdatedString();case"elapsed":return formatElapsedString();default:return showDate?timestamp?fullDateDisplay():text2:fullTimeDisplay()}};return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,children:jsx("div",{className:"pb_timestamp_kit",children:unstyled?jsx("div",{children:timestampText()}):jsx(Caption,{dark:dark,size:"xs",text:timestampText()})})})};const MessageMention=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,variant:variant="user"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_message_mention",variant),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})};const Message=props=>{const{aria:aria={},avatarName:avatarName,avatarStatus:avatarStatus=null,avatarUrl:avatarUrl,children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,label:label,message:message,timestamp:timestamp,timestampObject:timestampObject,timezone:timezone,alignTimestamp:alignTimestamp="right"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const shouldDisplayAvatar=avatarUrl||avatarName;const baseClassName=shouldDisplayAvatar?"pb_message_kit_avatar":"pb_message_kit";const classes=classnames(buildCss(baseClassName),globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[shouldDisplayAvatar&&jsx(Avatar,{imageUrl:avatarUrl,name:avatarName,size:"xs",status:avatarStatus}),jsxs("div",{className:"content_wrapper",children:[jsxs(Flex,{justify:alignTimestamp==="left"?"none":"between",orientation:"row",children:[label&&jsx(Title,{className:"message_title",size:4,text:label}),jsx(Timestamp,{className:`pull-${alignTimestamp} ${timestampObject?"message_humanized_time":null}`,text:timestamp,timestamp:"",timezone:timezone}),timestampObject&&jsx(Timestamp,{className:`pull-${alignTimestamp} message_timestamp`,text:"",timestamp:timestampObject,timezone:timezone})]}),message&&jsx(Body$1,{className:"pb_message_body",text:message}),children]})]})};Message.Mention=MessageMention;const MultipleUsers=props=>{const{aria:aria={},className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,maxDisplayedUsers:maxDisplayedUsers=4,reverse:reverse=false,size:size="xs",users:users}=props;const displayCount=users.length>maxDisplayedUsers?maxDisplayedUsers-1:users.length;const usersToDisplay=users.slice(0,displayCount);const reverseClass=reverse===true?"reverse":"";const avatarSizeClass=size==="xxs"?"xxs":"xs";const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_multiple_users_kit",reverseClass),globalProps(props),className);const itemClasses=classnames("pb_multiple_users_item",buildCss("multiple_users_badge",avatarSizeClass));return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[usersToDisplay.map(((avatarData,index)=>createElement(Avatar,{...avatarData,className:"pb_multiple_users_item",dark:dark,imageAlt:avatarData.name,key:index,size:size}))),users.length>maxDisplayedUsers&&jsx("div",{className:itemClasses,children:`+${users.length-3}`})]})};const MultipleUsersStacked=props=>{const{aria:aria={},className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,users:users}=props;const moreThanTwo=users.length>2;const onlyOne=users.length==1;const displayCount=()=>moreThanTwo?1:users.length;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_multiple_users_stacked_kit",{single:onlyOne}),globalProps(props),className);const firstUser=()=>users.slice(0,1).map(((userObject,index)=>createElement(Avatar,{...userObject,className:"pb_multiple_users_stacked_item",dark:dark,key:index,size:"xs"})));const secondUser=()=>{if(moreThanTwo===false){return users.slice(1,2).map(((userObject,index)=>createElement(Avatar,{...userObject,className:"pb_multiple_users_stacked_item second_item",dark:dark,key:index,size:"xs"})))}};const plusUsers=()=>{if(moreThanTwo===true){return jsx(Badge,{className:"pb_multiple_users_stacked_item second_item",dark:dark,rounded:true,text:`+${users.length-displayCount()}`,variant:"primary"})}};return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[firstUser(),secondUser(),plusUsers()]})};const previousOverlayDirectionMap$1={bottom:"to top",top:"to bottom",left:"to right",right:"to left",x:"to right",y:"to top"};const subsequentOverlayDirectionMap$1={...previousOverlayDirectionMap$1,x:"to left",y:"to bottom"};const OverlayPercentage=props=>{const{children:children,color:color,position:position,size:size}=props;const getPreviousOverlayDirection=()=>previousOverlayDirectionMap$1[position];const getSubsequentOverlayDirection=()=>subsequentOverlayDirectionMap$1[position];const hasSubsequentOverlay=position==="x"||position==="y";const previousOverlay=`linear-gradient(${getPreviousOverlayDirection()}, ${colors[color]} 0%, transparent ${size})`;const subsequentOverlay=`linear-gradient(${getSubsequentOverlayDirection()}, ${colors[color]} 0%, transparent ${size})`;return jsxs(Fragment,{children:[jsx("div",{className:"overlay_linear_gradient",style:{background:previousOverlay}}),children,hasSubsequentOverlay&&jsx("div",{className:"overlay_linear_gradient",style:{background:subsequentOverlay}})]})};const previousOverlayDirectionMap={x:"left",y:"top"};const subsequentOverlayDirectionMap={x:"right",y:"bottom"};const OverlayToken=props=>{const{children:children,color:color,position:position,size:size}=props;const hasSubsequentOverlay=position==="x"||position==="y";const getPreviousOverlayDirection=()=>hasSubsequentOverlay?previousOverlayDirectionMap[position]:position;const getSubsequentOverlayDirection=()=>hasSubsequentOverlay?subsequentOverlayDirectionMap[position]:position;const previousOverlayClassName=`overlay_${color}_${getPreviousOverlayDirection()}_${size}`;const subsequentOverlayClassName=`overlay_${color}_${getSubsequentOverlayDirection()}_${size}`;return jsxs(Fragment,{children:[jsx("div",{className:previousOverlayClassName}),children,hasSubsequentOverlay&&jsx("div",{className:subsequentOverlayClassName})]})};const Overlay=props=>{const{aria:aria={},className:className,children:children,color:color="card_light",data:data={},htmlOptions:htmlOptions={},id:id,layout:layout={bottom:"full"}}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const classes=classnames(buildCss("pb_overlay"),globalProps(props),className);const htmlProps=buildHtmlProps(htmlOptions);const getPosition=()=>Object.keys(layout)[0];const getSize2=()=>Object.values(layout)[0];const isSizePercentage=getSize2().includes("%");return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:isSizePercentage?OverlayPercentage({children:children,color:color,position:getPosition(),size:getSize2()}):OverlayToken({children:children,color:color,position:getPosition(),size:getSize2()})})};const Person=props=>{const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},firstName:firstName,id:id,lastName:lastName}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_person_kit"),globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[jsx(Body$1,{className:"pb_person_first",tag:"span",children:firstName}),lastName&&jsx(Title,{className:"pb_person_first",size:4,text:` ${lastName}`})]})};const PersonContact=props=>{const{aria:aria={},className:className,contacts:contacts=[],data:data={},firstName:firstName,htmlOptions:htmlOptions={},id:id,lastName:lastName}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_person_contact_kit"),globalProps(props),className);const wrongContacts=()=>contacts.filter((contactObject=>contactObject.contactType==="wrong-phone"));const validContacts=()=>contacts.filter((contactObject=>contactObject.contactType!=="wrong-phone"));return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[jsx(Person,{firstName:firstName,lastName:lastName}),validContacts().map(((contactObject,index)=>jsx(Contact,{contactDetail:contactObject.contactDetail,contactType:contactObject.contactType,contactValue:contactObject.contactValue},`valid-contact-${index}`))),wrongContacts().map(((contactObject,index)=>jsxs("div",{children:[jsx(Caption,{className:"wrong_numbers",text:"wrong number"},`wrong-contact-caption-${index}`),jsx(Contact,{contactType:contactObject.contactType,contactValue:contactObject.contactValue},`wrong-contact-${index}`)]},`wrong-contact-caption-wrapper-${index}`)))]})};const ProgressPill=({active:active,dark:dark,steps:step})=>jsx("div",{className:`pb_progress_pill${step<=active?"_active":"_inactive"}${dark?" dark":""}`},step);const showSteps=(steps,active,dark)=>{const items=[];for(let step=1;step<=steps;step++){items.push(ProgressPill({steps:step,active:active,dark:dark}))}return items};const ProgressPills=props=>{const{active:active=0,aria:aria={hidden:"true"},className:className,data:data={},htmlOptions:htmlOptions={},id:id,steps:steps=3,title:title,value:value,dark:dark=false}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_progress_pills_kit"),globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[title&&jsxs("div",{className:"progress_pills_status",children:[jsx(Title,{dark:dark,size:4,tag:"h4",text:title}),jsx(Body$1,{color:"light",dark:dark,text:value})]}),jsx("div",{className:"progress_pills",children:showSteps(steps,active,dark)})]})};const ProgressSimple=props=>{const{align:align,className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},max:max2,muted:muted=false,percent:percent="",value:value,variant:variant="default",width:width="100%"}=props;const styles2={width:width};const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const variantStyle=variant=="default"?"":variant;const valueStyles={width:percent?`${percent}%`:`${value*100/max2}%`};const wrapperClass=classnames(buildCss("pb_progress_simple_wrapper",align,{dark:dark}),globalProps(props),className);const kitClass=classnames(buildCss("pb_progress_simple_kit",{muted:muted},variantStyle,align),className);return jsx("div",{...dataProps,...htmlProps,className:wrapperClass,children:jsx("div",{className:kitClass,"data-value":value,style:styles2,children:jsx("div",{className:"progress_simple_value",style:valueStyles})})})};const ProgressStep=props=>{const{aria:aria={},className:className,children:children,color:color,data:data={},orientation:orientation="horizontal",htmlOptions:htmlOptions={},icon:icon=false,showIcon:showIcon=false,variant:variant}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const iconStyle=icon===true||showIcon===true?"icon":"";const progressStepCss=buildCss("pb_progress_step_kit",orientation,iconStyle,variant,color);return jsx("ul",{...ariaProps,...dataProps,...htmlProps,className:classnames(progressStepCss,globalProps(props),className),children:children})};const ProgressStepItem=props=>{const{className:className,data:data={},status:status="inactive",children:children,htmlOptions:htmlOptions={},icon:icon="check"}=props;const progressStepItem=buildCss("pb_progress_step_item",status);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);return jsx("li",{...dataProps,...htmlProps,className:classnames(progressStepItem,className),children:jsxs("div",{className:"box",children:[jsx("div",{className:"circle",children:jsx(Icon,{icon:icon})}),jsx("div",{className:"content",children:children})]})})};const createOptions=options=>options.map(((option,index)=>jsx("option",{disabled:option.disabled,value:option.value,children:option.text||option.value},index)));const Select=({aria:aria={},blankSelection:blankSelection,children:children,className:className,compact:compact=false,data:data={},disabled:disabled=false,error:error,label:label,htmlOptions:htmlOptions={},inline:inline=false,multiple:multiple=false,name:name,onChange:onChange=()=>void 0,options:options=[],required:required=false,showArrow:showArrow=false,value:value,...props},ref)=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const optionsList=createOptions(options);const inlineClass=inline?"inline":null;const compactClass=compact?"compact":null;const classes=classnames(buildCss("pb_select"),globalProps({...props,marginBottom:props.marginBottom||props.margin||"sm"}),className,inlineClass,{show_arrow:showArrow},compactClass);const selectWrapperClass=classnames(buildCss("pb_select_kit_wrapper"),{error:error},className);const selectBody=(()=>{if(children)return children;return jsxs("select",{...htmlOptions,...domSafeProps(props),disabled:disabled,id:name,multiple:multiple,name:name,onChange:onChange,ref:ref,required:required,value:value,children:[blankSelection&&jsx("option",{value:"",children:blankSelection}),optionsList]})})();return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,children:[label&&jsx("label",{className:"pb_select_kit_label",htmlFor:name,children:jsx(Caption,{text:label})}),jsxs("label",{className:selectWrapperClass,htmlFor:name,children:[selectBody,multiple!==true?jsx(Icon,{className:"pb_select_kit_caret",fixedWidth:true,icon:"angle-down"}):null,error&&jsx(Body$1,{status:"negative",text:error})]})]})};const Select$1=forwardRef(Select);const SelectableCard=props=>{const{aria:aria={},checked:checked=false,className:className,customIcon:customIcon,dark:dark=false,data:data={},disabled:disabled=false,error:error=false,htmlOptions:htmlOptions={},icon:icon=false,inputId:inputId=null,multi:multi=true,name:name,onChange:onChange=noop$3,text:text2,value:value,variant:variant="default"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_selectable_card_kit",{checked:checked,disabled:disabled,enabled:!disabled}),{error:error},dark?"dark":"",className);const displayIcon2=()=>{if(icon===true){return jsx("div",{className:"pb_selectable_card_circle",children:jsx(Icon,{customIcon:customIcon,fixedWidth:true,icon:"check"})})}};const inputRef=useRef(null);const handleClick=()=>{inputRef.current.click()};const inputType=multi?"checkbox":"radio";const inputIdPresent=inputId!==null?inputId:name;const Input=multi?Checkbox:Radio;const filteredProps={...props};filteredProps==null?true:delete filteredProps.inputId;filteredProps==null?true:delete filteredProps.children;filteredProps==null?true:delete filteredProps.icon;filteredProps==null?true:delete filteredProps.error;filteredProps==null?true:delete filteredProps.dark;filteredProps==null?true:delete filteredProps.multi;filteredProps==null?true:delete filteredProps.customIcon;const labelProps=variant==="displayInput"?{...filteredProps,padding:"none"}:{...filteredProps};return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,children:[jsx("input",{checked:checked,disabled:disabled,id:inputIdPresent,name:name,onChange:onChange,ref:inputRef,type:inputType,value:value,...filteredProps}),jsxs("label",{className:globalProps(labelProps),htmlFor:inputIdPresent,children:[variant==="displayInput"?jsxs(Flex,{vertical:"center",children:[jsx(Flex,{orientation:"column",padding:"sm",paddingRight:"xs",vertical:"center",children:jsx(Input,{dark:dark,children:jsx("input",{checked:checked,disabled:disabled,onClick:handleClick,readOnly:true,type:inputType})})}),jsx("div",{className:"separator"}),jsx("div",{className:"psuedo_separator"}),jsx(Card,{borderNone:true,dark:dark,padding:"sm",status:error?"negative":null,children:text2||props.children})]}):text2||props.children,displayIcon2()]})]})};const SelectableIcon=({aria:aria={},className:className,checked:checked=false,customIcon:customIcon,data:data={},disabled:disabled=false,htmlOptions:htmlOptions={},icon:icon,inputId:inputId,inputs:inputs="enabled",multi:multi=true,name:name,text:text2,value:value,...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_selectable_icon_kit",{checked:checked,disabled:disabled,enabled:!disabled}),globalProps(props),className);const inputType=multi===false?"radio":"checkbox";const inputIdPresent=inputId!==null?inputId:name;return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,children:[inputs==="disabled"&&jsxs(Fragment,{children:[jsx(Icon,{customIcon:customIcon,icon:icon,size:"2x"}),jsx(Title,{size:4,tag:"h4",text:text2})]}),inputs==="enabled"&&jsxs(Fragment,{children:[jsx("input",{...props,checked:checked,disabled:disabled,id:inputIdPresent,name:name,type:inputType,value:value}),jsxs("label",{htmlFor:inputIdPresent,children:[jsx(Icon,{customIcon:customIcon,icon:icon,size:"2x"}),jsx(Title,{size:4,tag:"h4",text:text2})]})]})]})};const SelectableCardIcon=props=>{const{aria:aria={},checkmark:checkmark=false,checked:checked=false,className:className,customIcon:customIcon,dark:dark=false,data:data={},disabled:disabled=false,htmlOptions:htmlOptions={},icon:icon,inputId:inputId,multi:multi=true,name:name,titleText:titleText,bodyText:bodyText,value:value,onChange:onChange}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_selectable_card_icon_kit",{checked:checked,disabled:disabled,enabled:!disabled}),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,children:jsx(SelectableCard,{checked:checked,customIcon:customIcon,dark:dark,disabled:disabled,icon:checkmark,inputId:inputId,multi:multi,name:name,onChange:onChange,value:value,children:jsxs(Fragment,{children:[jsx(SelectableIcon,{customIcon:customIcon,icon:icon,inputId:"",inputs:"disabled",name:"",text:titleText}),jsx(Body$1,{color:"light",dark:dark,text:bodyText})]})})})};const SelectableListItem=({aria:aria={},checked:checked=false,children:children,className:className,data:data={},dragId:dragId,dragHandle:dragHandle=true,defaultChecked:defaultChecked,htmlOptions:htmlOptions={},id:id,label:label,text:text2="",name:name="",value:value="",variant:variant="checkbox",onChange:onChange=()=>{},...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_selectable_list_item_kit"),globalProps(props),className);const initialCheckedState=checked;const[checkedState,setCheckedState]=useState(initialCheckedState);const handleChecked=event=>{onChange(event);setCheckedState(event.target.checked)};return jsx(ListItem,{...props,className:classnames(checkedState?"checked_item":"",className),dragHandle:dragHandle,dragId:dragId,children:jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,children:[variant=="checkbox"&&jsxs(Fragment,{children:[jsx(Checkbox,{checked:checkedState,id:id,name:name,onChange:handleChecked,text:label||text2&&false,type:"checkbox",value:value,...props}),children]}),variant=="radio"&&jsxs(Fragment,{children:[jsx(Radio,{defaultChecked:defaultChecked,id:id,label:label,name:name,onChange:onChange,text:label,type:"radio",value:value,...domSafeProps(props)}),children]}),variant!=="checkbox"&&variant!=="radio"&&{children:children}]})})};const SelectableList=props=>{var _a,_b;const{aria:aria={},children:children,className:className,data:data={},enableDrag:enableDrag=false,htmlOptions:htmlOptions={},id:id}=props;const ariaProps=buildAriaProps(aria);const classes=classnames(buildCss("pb_selectable_list_kit"),globalProps(props),className);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const isRadio=props.variant==="radio";const defaultCheckedRadioValue=(_b=(_a=children.filter((item=>item.props.defaultChecked))[0])==null?void 0:_a.props)==null?void 0:_b.value;const[selectedRadioValue,setSelectedRadioValue]=useState(defaultCheckedRadioValue);const onChangeRadioValue=({target:target})=>{setSelectedRadioValue(target.value)};let selectableListItems=children;if(isRadio){selectableListItems=children.map((({props:props2})=>createElement(SelectableListItem,{...props2,className:classnames(selectedRadioValue===props2.value?"checked_item":"",props2.className),key:props2.value,onChange:evt=>{var _a2;onChangeRadioValue(evt);(_a2=props2==null?void 0:props2.onChange)==null?void 0:_a2.call(props2,evt)}})))}return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsx(List,{enableDrag:enableDrag,variant:props.variant,children:selectableListItems})})};SelectableList.Item=SelectableListItem;const Source=({aria:aria={},className:className,data:data={},hideIcon:hideIcon=false,htmlOptions:htmlOptions={},id:id,source:source,type:type="inbound",user:user={}})=>{const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const ariaProps=buildAriaProps(aria);const css=classnames(["pb_source_kit",className]);const avatar=()=>{if((type==="user"||type==="referral")&&user.name!==void 0){const avatarProps={...user};avatarProps.size="sm";delete avatarProps.userId;return avatarProps}};const typeText=()=>{if(type==="user"||type==="referral"&&user.name!==void 0){return user.name}else{return titleize(type)}};const typeIconNames={events:"calendar-alt",outbound:"sign-out",prospecting:"binoculars",referral:"handshake",retail:"shopping-bag",inbound:"sign-in"};const showIcon=()=>type!=="user"&&avatar()===void 0;return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:css,id:id,children:jsxs("div",{className:"pb__source_layout",children:[hideIcon===false&&jsxs(Fragment,{children:[showIcon()&&jsx(IconCircle,{icon:typeIconNames[type],size:"sm"}),!showIcon()&&jsx(Avatar,{...avatar()})]}),jsxs("div",{className:"pb__source_content",children:[jsx(Title,{size:4,tag:"h4",text:source}),jsxs("div",{className:"pb__source_value",children:[jsx(Body$1,{color:"light",text:typeText()}),user.userId&&jsx(Caption,{text:user.userId})]})]})]})})};const starYellow=jsx("svg",{className:"iamyellow",fill:"none",viewBox:"0 0 18 16",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{clipRule:"evenodd",d:"M9.86015 0.4371C9.73527 0.187329 9.4855 0 9.17328 0C8.89229 0 8.64252 0.187329 8.51763 0.4371L6.36335 4.83932L1.58647 5.55742C1.30547 5.58864 1.08692 5.80719 0.99326 6.05696C0.899595 6.33795 0.962038 6.61895 1.18059 6.8375L4.64617 10.2719L3.80319 15.1112C3.77197 15.3922 3.89685 15.7044 4.11541 15.8605C4.36518 16.0166 4.64617 16.0478 4.89594 15.9229L9.17328 13.6126L13.4506 15.9229C13.7004 16.0478 14.0126 16.0166 14.2624 15.8605C14.4809 15.7044 14.6058 15.3922 14.5434 15.1112L13.7316 10.2719L17.1972 6.8375C17.4157 6.61895 17.4782 6.33795 17.3845 6.05696C17.2909 5.80719 17.0723 5.58864 16.7913 5.55742L12.0144 4.83932L9.86015 0.4371Z",fill:"#F9BB00",fillRule:"evenodd"})});const starPrimary=jsx("svg",{fill:"none",viewBox:"0 0 18 16",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{clipRule:"evenodd",d:"M9.86015 0.4371C9.73527 0.187329 9.4855 0 9.17328 0C8.89229 0 8.64252 0.187329 8.51763 0.4371L6.36335 4.83932L1.58647 5.55742C1.30547 5.58864 1.08692 5.80719 0.99326 6.05696C0.899595 6.33795 0.962038 6.61895 1.18059 6.8375L4.64617 10.2719L3.80319 15.1112C3.77197 15.3922 3.89685 15.7044 4.11541 15.8605C4.36518 16.0166 4.64617 16.0478 4.89594 15.9229L9.17328 13.6126L13.4506 15.9229C13.7004 16.0478 14.0126 16.0166 14.2624 15.8605C14.4809 15.7044 14.6058 15.3922 14.5434 15.1112L13.7316 10.2719L17.1972 6.8375C17.4157 6.61895 17.4782 6.33795 17.3845 6.05696C17.2909 5.80719 17.0723 5.58864 16.7913 5.55742L12.0144 4.83932L9.86015 0.4371Z",fill:"#0056CF",fillRule:"evenodd"})});const starSubtle=jsx("svg",{fill:"none",viewBox:"0 0 18 16",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{clipRule:"evenodd",d:"M8.90904 0.4371C8.78416 0.187329 8.53438 0 8.22217 0C7.94118 0 7.69141 0.187329 7.56652 0.4371L5.41224 4.83932L0.635357 5.55742C0.354364 5.58864 0.135813 5.80719 0.042149 6.05696C-0.0515154 6.33795 0.0109275 6.61895 0.229478 6.8375L3.69506 10.2719L2.85208 15.1112C2.82086 15.3922 2.94574 15.7044 3.16429 15.8605C3.41407 16.0166 3.69506 16.0478 3.94483 15.9229L8.22217 13.6126L12.4995 15.9229C12.7493 16.0478 13.0615 16.0166 13.3113 15.8605C13.5298 15.7044 13.6547 15.3922 13.5923 15.1112L12.7805 10.2719L16.2461 6.8375C16.4646 6.61895 16.5271 6.33795 16.4334 6.05696C16.3397 5.80719 16.1212 5.58864 15.8402 5.55742L11.0633 4.83932L8.90904 0.4371Z",fillRule:"evenodd"})});const starOutline=jsx("svg",{fill:"none",height:"16",viewBox:"0 0 17 16",width:"17",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M5.91323 5.33377L6.17269 5.29477L6.28801 5.0591L8.44116 0.659187C8.49971 0.543364 8.59517 0.5 8.64884 0.5C8.74499 0.5 8.83506 0.555009 8.88775 0.659235L11.0409 5.0591L11.1562 5.29477L11.4157 5.33377L16.1925 6.05186L16.2021 6.0533L16.2117 6.05436C16.2359 6.05706 16.2671 6.06847 16.3024 6.09973C16.3374 6.13062 16.3686 6.17476 16.3886 6.22412C16.4186 6.32162 16.401 6.40181 16.3198 6.48332C16.3196 6.48353 16.3194 6.48374 16.3192 6.48395L12.8552 9.91671L12.6712 10.0991L12.7141 10.3546L13.5258 15.1939L13.528 15.2068L13.5308 15.2196C13.5488 15.3004 13.5074 15.402 13.4567 15.4462C13.3391 15.5132 13.2227 15.5096 13.1546 15.4781L8.88646 13.1726L8.64884 13.0443L8.41121 13.1726L4.14274 15.4782C4.07877 15.5083 3.99031 15.5147 3.87267 15.4466C3.82302 15.4033 3.76655 15.2914 3.77463 15.1781L4.61431 10.3577L4.65911 10.1005L4.47368 9.91671L1.0097 6.48394C1.00947 6.48372 1.00925 6.4835 1.00903 6.48327C0.927878 6.40178 0.91031 6.3216 0.94026 6.22412C0.960274 6.17476 0.99154 6.13062 1.02646 6.09973C1.0618 6.06847 1.09296 6.05706 1.11724 6.05436L1.12682 6.0533L1.13635 6.05186L5.91323 5.33377Z",stroke:"#C1CDD6"})});const getStarIconObject=(backgroundType,color,dark,size)=>{const colorClassName=color==="subtle"?dark?"suble_star_dark":"suble_star_light":color==="primary"?dark?"primary_star_dark":"primary_star_light":`${color}_star`;const backgroundClassName=backgroundType==="outline"?dark?"outline_empty_star_dark":"outline_empty_star_light":dark?"empty_star_dark":"empty_star_light";return{yellow:{className:`pb_star_${size} ${colorClassName}`,icon:starYellow},primary:{className:`pb_star_${size} ${colorClassName}`,icon:starPrimary},subtle:{className:`pb_star_${size} ${colorClassName}`,icon:starSubtle},fill:{className:`pb_star_${size} ${backgroundClassName}`,icon:starYellow},outline:{className:`pb_star_${size} ${backgroundClassName}`,icon:starOutline}}};const StarRatingInteractive=props=>{const{backgroundType:backgroundType,colorOption:colorOption,dark:dark,denominator:denominator,onClick:onClick,size:size}=props;const[interactiveStarValue,setInteractiveStarValue]=useState(0);const[hoverStarValue,setHoverStarValue]=useState(null);const starIcon=getStarIconObject(backgroundType,colorOption,dark,size);const handleOnClick=interactiveStarValue2=>{setInteractiveStarValue(interactiveStarValue2);onClick&&onClick(interactiveStarValue2)};const handleMouseEnter=value=>{setHoverStarValue(value)};const handleMouseLeave=()=>{setHoverStarValue(null)};const handleOnKeyDown=(event,starIndex)=>{if(event.key==="Enter"||event.key===" "){event.preventDefault();handleOnClick(starIndex)}};return jsx(Flex,{className:"star_flex_area",children:[...Array(denominator)].map(((_,index)=>{const starIndex=index+1;const isFilled=starIndex<=interactiveStarValue;const isHovered=hoverStarValue!==null&&starIndex>interactiveStarValue&&starIndex<=hoverStarValue;const baseClass=dark?starIcon[backgroundType].className.replace("empty_star_light","empty_star_dark"):starIcon[backgroundType].className;let starClass=baseClass;if(isFilled){starClass=starClass.replace(/(empty_star_light|empty_star_dark)/,"");starClass+=` ${starIcon[colorOption].className}`}if(isHovered){starClass+=" star-hovered"}if(isFilled&&starIndex===interactiveStarValue){starClass+=" star-selected"}return jsx("div",{onKeyDown:event=>handleOnKeyDown(event,starIndex),children:jsx(Icon,{className:starClass.trim(),cursor:"pointer",customIcon:starIcon[backgroundType].icon,htmlOptions:{onClick:()=>handleOnClick(starIndex),onMouseEnter:()=>handleMouseEnter(starIndex),onMouseLeave:()=>handleMouseLeave()},icon:"",tabIndex:0})},index)}))})};const StarRatingDisplay=props=>{const{backgroundType:backgroundType,colorOption:colorOption,dark:dark,denominator:denominator,layoutOption:layoutOption,rating:rating,size:size}=props;const denominatorStyle=layoutOption==="onestar"?1:denominator;const activeStars=Math.round(rating)>denominatorStyle?denominatorStyle:Math.round(rating);const emptyStars=denominatorStyle-Math.round(rating)<0?0:denominatorStyle-Math.round(rating);const starIcon=getStarIconObject(backgroundType,colorOption,dark,size);return jsxs(Flex,{className:"star_flex_area",children:[[...Array(activeStars)].map(((_,index)=>jsx(React__default.Fragment,{children:jsx(Icon,{className:starIcon[colorOption].className,customIcon:starIcon[colorOption].icon,icon:""})},index))),[...Array(emptyStars)].map(((_,index)=>jsx(React__default.Fragment,{children:jsx(Icon,{className:starIcon[backgroundType].className,customIcon:starIcon[backgroundType].icon,icon:""})},index)))]})};const StarRating=props=>{const{aria:aria={},className:className,data:data={},dark:dark=false,layoutOption:layoutOption="default",htmlOptions:htmlOptions={},id:id,rating:rating=0,denominator:denominator=5,colorOption:colorOption="yellow",backgroundType:backgroundType="fill",size:size="sm",variant:variant="display",onClick:onClick}=props;const classes=classnames(buildCss("pb_star_rating_kit"),globalProps(props),className);const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const oneDecimalRating=rating.toFixed(1);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[layoutOption==="number"&&jsxs(Fragment,{children:[(size==="xs"||size==="sm")&&jsx(Caption,{className:"pb_star_rating_number_sm",dark:dark,paddingRight:"xs",size:"xs",text:oneDecimalRating.toString()}),size==="md"&&jsx(Body$1,{className:"pb_star_rating_number_md",color:"light",dark:dark,paddingRight:"xs",text:oneDecimalRating.toString()}),size==="lg"&&jsx(Title,{bold:false,className:"pb_star_rating_number_lg",color:"light",dark:dark,paddingRight:"sm",size:2,text:oneDecimalRating.toString()})]}),variant==="display"&&jsx(StarRatingDisplay,{backgroundType:backgroundType,colorOption:colorOption,dark:dark,denominator:denominator,layoutOption:layoutOption,rating:rating,size:size}),variant==="interactive"&&jsx(StarRatingInteractive,{backgroundType:backgroundType,colorOption:colorOption,dark:dark,denominator:denominator,onClick:onClick,size:size}),layoutOption==="onestar"&&jsxs(Fragment,{children:[(size==="xs"||size==="sm")&&jsx(Caption,{className:"pb_star_rating_number_sm",dark:dark,size:"xs",text:`${rating.toString()} of ${denominator}`}),size==="md"&&jsx(Body$1,{className:"pb_star_rating_number_md",color:"light",dark:dark,text:`${rating.toString()} of ${denominator}`}),size==="lg"&&jsx(Title,{bold:false,className:"pb_star_rating_number_lg",color:"light",dark:dark,size:2,text:`${rating.toString()} of ${denominator}`})]})]})};const Textarea=({aria:aria={},characterCount:characterCount,className:className,children:children,data:data={},disabled:disabled,htmlOptions:htmlOptions={},inline:inline=false,resize:resize="none",error:error,label:label,maxCharacters:maxCharacters,name:name,onChange:onChange=()=>{},placeholder:placeholder,required:required,rows:rows=4,value:value,...props})=>{const ref=useRef(null);useEffect((()=>{if(ref.current&&resize==="auto"){PbTextarea.addMatch(ref.current)}}));const errorClass=error?"error":null;const inlineClass=inline?"inline":"";const resizeClass=`resize_${resize}`;const classes=classnames("pb_textarea_kit",errorClass,inlineClass,resizeClass,globalProps(props),className);const noCount=typeof characterCount!=="undefined";const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const checkIfZero=characterCount2=>characterCount2==0?characterCount2.toString():characterCount2;const characterCounter=()=>maxCharacters&&characterCount?`${checkIfZero(characterCount)} / ${maxCharacters}`:`${checkIfZero(characterCount)}`;return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,children:[jsx(Caption,{text:label}),children||jsx("textarea",{className:"pb_textarea_kit",disabled:disabled,name:name,onChange:onChange,placeholder:placeholder,ref:ref,required:required,rows:rows,value:value,...props}),error?jsx(Fragment,{children:characterCount?jsxs(Flex,{spacing:"between",vertical:"center",children:[jsx(FlexItem,{children:jsx(Body$1,{margin:"none",status:"negative",text:error})}),jsx(FlexItem,{children:jsx(Caption,{margin:"none",size:"xs",text:characterCounter()})})]}):jsx(Body$1,{status:"negative",text:error})}):noCount&&jsx(Caption,{margin:"none",size:"xs",text:characterCounter()})]})};const Textarea$1=forwardRef(Textarea);const timezoneString=dateValue=>`${DateTime$1.toTimeZone(dateValue)}`;const dateTimestamp=dateValue=>`${DateTime$1.toHour(dateValue)}:${DateTime$1.toMinute(dateValue)}${DateTime$1.toMeridiem(dateValue)}`;const dateTimeIso=dateValue=>DateTime$1.toIso(dateValue);const TimeRangeInline=props=>{const{aria:aria={},className:className,data:data={},alignment:alignment="left",htmlOptions:htmlOptions={},size:size="sm",dark:dark=false,icon:icon=false,timezone:timezone=false,startTime:startTime,endTime:endTime,id:id}=props;const dataProps=buildDataProps(data);const ariaProps=buildAriaProps(aria);const htmlProps=buildHtmlProps(htmlOptions);const separator=jsx(Body$1,{color:"light",children:jsx(Icon,{className:"pb_time_range_inline_arrow",dark:dark,fixedWidth:true,icon:"long-arrow-right"})});const iconContent=()=>icon&&jsx(Body$1,{color:"light",tag:"span",children:jsx(Icon,{className:"pb_time_range_inline_icon",dark:dark,fixedWidth:true,icon:"clock",size:size,tag:"span"})});return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classnames("pb_time_range_inline_kit_"+alignment,globalProps(props),className),id:id,children:jsxs("div",{className:"pb_time_range_inline_wrapper",children:[size=="xs"&&jsxs(Fragment,{children:[jsxs(Caption,{dark:dark,tag:"span",children:[iconContent(),jsx("time",{dateTime:dateTimeIso(startTime),children:` ${dateTimestamp(startTime)} `})]}),jsx(Caption,{className:"pb_time_range_inline_arrow",dark:dark,tag:"span",children:separator}),jsx(Caption,{dark:dark,tag:"span",children:jsx("time",{dateTime:dateTimeIso(endTime),children:` ${dateTimestamp(endTime)} `})}),timezone&&jsx(Caption,{className:"pb_time_range_inline_timezone",dark:dark,tag:"span",children:timezoneString(endTime)})]}),size=="sm"&&jsxs(Fragment,{children:[jsxs(Body$1,{dark:dark,tag:"span",children:[iconContent(),jsx("time",{dateTime:dateTimeIso(startTime),children:` ${dateTimestamp(startTime)} `})]}),jsx(Body$1,{className:"pb_time_range_inline_arrow",dark:dark,tag:"span",children:separator}),jsx(Body$1,{dark:dark,tag:"span",children:jsx("time",{dateTime:dateTimeIso(endTime),children:` ${dateTimestamp(endTime)} `})}),timezone&&jsx(Body$1,{className:"pb_time_range_inline_timezone",color:"light",dark:dark,tag:"span",children:timezoneString(endTime)})]})]})})};const TimelineItem=({className:className,children:children,date:date,htmlOptions:htmlOptions={},icon:icon="user",iconColor:iconColor="default",lineStyle:lineStyle="solid",...props})=>{const timelineItemCss=buildCss("pb_timeline_item_kit",lineStyle);const htmlProps=buildHtmlProps(htmlOptions);return jsxs("div",{...htmlProps,className:classnames(timelineItemCss,globalProps(props),className),children:[jsx("div",{className:"pb_timeline_item_left_block",children:date&&jsx(DateStacked,{align:"center",date:date,size:"sm"})}),jsxs("div",{className:"pb_timeline_item_step",children:[jsx(IconCircle,{icon:icon,size:"xs",variant:iconColor}),jsx("div",{className:"pb_timeline_item_connector"})]}),jsx("div",{className:"pb_timeline_item_right_block",children:children})]})};const Timeline=({aria:aria={},className:className,children:children,data:data={},htmlOptions:htmlOptions={},id:id,orientation:orientation="horizontal",showDate:showDate=false,...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const dateStyle=showDate===true?"_with_date":"";const timelineCss=buildCss("pb_timeline_kit",`_${orientation}`,dateStyle);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classnames(timelineCss,globalProps(props),className),id:id,children:children})};Timeline.Item=TimelineItem;const TitleDetail=props=>{const{align:align="left",aria:aria={},className:className,data:data={},detail:detail,htmlOptions:htmlOptions={},id:id,title:title}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const pbCss=buildCss("pb_title_detail_kit",align);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classnames(pbCss,globalProps(props),className),id:id,children:[jsx(Title,{size:4,text:title}),jsx(Body$1,{color:"light",text:detail})]})};const Toggle=({aria:aria={},checked:checked=false,children:children,className:className,data:data={},disabled:disabled=false,id:id,htmlOptions:htmlOptions={},name:name,onChange:onChange=()=>{},size:size="sm",value:value,...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const css=classnames(buildCss("pb_toggle_kit",size,{on:checked,off:!checked}));return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classnames(css,globalProps(props),className),id:id,children:jsxs("label",{className:"pb_toggle_wrapper",children:[children&&children,!children&&jsx("input",{...props,defaultChecked:checked,disabled:disabled,name:name,onChange:onChange,type:"checkbox",value:value}),jsx("div",{className:"pb_toggle_control"})]})})};const Veteran=()=>jsxs("svg",{viewBox:"0 0 200 250",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M198.4 71.5V71c-.2-1.2-1.4-2.1-1.4-2.1L103.2 2.7c-.7-.4-1-.6-1.6-.6-1.3 0-2.3 1-2.3 2.3v67.1h-.6v29.6h99.8l-.1-29.6z",fill:"#004876"}),jsx("path",{d:"M172.9 159.2c-31.4 23-33.2 24.3-33.2 24.3l-40.5 3.2v-29.4l73.7 1.9z",fill:"#FFF"}),jsx("path",{d:"M99.3 125.4V33.5L1.6 102.7l-.1.1c-1 .7-1.5 1.8-1.5 3v67.4c0 1.2.6 2.3 1.5 3l.1.1 93.5 66.3c1.7 1.2 4.1 0 4.1-2.1v-28.9l40.5-28-40.5.7v-25h73.7l25.4-16.9.2-16.8H99.3z",fill:"#BB2432"}),jsx("path",{d:"M99.3 101.1h99.3v24.3H99.3z",fill:"#FFF"})]});const MillionDollar=()=>jsxs("svg",{viewBox:"0 0 242.9 242.9",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",children:[jsx("circle",{cx:121.5,cy:121.5,r:121.5}),jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"a",x1:42.483,x2:200.309,y1:35.645,y2:35.645,children:[jsx("stop",{offset:0,style:{stopColor:"#e6b711"}}),jsx("stop",{offset:.128,style:{stopColor:"#eac23c"}}),jsx("stop",{offset:.278,style:{stopColor:"#ec6"}}),jsx("stop",{offset:.413,style:{stopColor:"#f1d485"}}),jsx("stop",{offset:.527,style:{stopColor:"#f2d998"}}),jsx("stop",{offset:.607,style:{stopColor:"#f3db9f"}}),jsx("stop",{offset:1,style:{stopColor:"#e6b711"}})]}),jsx("path",{d:"M56.4 53.8c16.9-16.2 39.8-26.2 65-26.2 25.2 0 48.1 10 64.9 26.2h14c-19.1-22.2-47.4-36.3-78.9-36.3-31.5 0-59.8 14.1-78.9 36.3h13.9z",style:{fill:"url(#a)"}}),jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"b",x1:17.407,x2:44.897,y1:132.179,y2:132.179,children:[jsx("stop",{offset:0,style:{stopColor:"#e6b711"}}),jsx("stop",{offset:.128,style:{stopColor:"#eac23c"}}),jsx("stop",{offset:.278,style:{stopColor:"#ec6"}}),jsx("stop",{offset:.413,style:{stopColor:"#f1d485"}}),jsx("stop",{offset:.527,style:{stopColor:"#f2d998"}}),jsx("stop",{offset:.607,style:{stopColor:"#f3db9f"}}),jsx("stop",{offset:1,style:{stopColor:"#e6b711"}})]}),jsx("path",{d:"M44.9 175.7c-10.9-15.3-17.3-34-17.3-54.2 0-14.1 3.1-27.5 8.8-39.5H25.3c-5 12.2-7.8 25.5-7.8 39.5 0 22.7 7.3 43.8 19.8 60.9l7.6-6.7z",style:{fill:"url(#b)"}}),jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"c",x1:52.914,x2:189.715,y1:212.573,y2:212.573,children:[jsx("stop",{offset:0,style:{stopColor:"#e6b711"}}),jsx("stop",{offset:.128,style:{stopColor:"#eac23c"}}),jsx("stop",{offset:.278,style:{stopColor:"#ec6"}}),jsx("stop",{offset:.413,style:{stopColor:"#f1d485"}}),jsx("stop",{offset:.527,style:{stopColor:"#f2d998"}}),jsx("stop",{offset:.607,style:{stopColor:"#f3db9f"}}),jsx("stop",{offset:1,style:{stopColor:"#e6b711"}})]}),jsx("path",{d:"M173 199.8c-14.8 9.8-32.5 15.5-51.6 15.5s-37-5.8-51.8-15.6H52.9c18.3 16.1 42.3 25.8 68.5 25.8 26.1 0 50-9.7 68.3-25.7H173z",style:{fill:"url(#c)"}}),jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"d",x1:31.123,x2:207.766,y1:136.159,y2:136.159,children:[jsx("stop",{offset:0,style:{stopColor:"#e6b711"}}),jsx("stop",{offset:.128,style:{stopColor:"#eac23c"}}),jsx("stop",{offset:.278,style:{stopColor:"#ec6"}}),jsx("stop",{offset:.413,style:{stopColor:"#f1d485"}}),jsx("stop",{offset:.527,style:{stopColor:"#f2d998"}}),jsx("stop",{offset:.607,style:{stopColor:"#f3db9f"}}),jsx("stop",{offset:1,style:{stopColor:"#e6b711"}})]}),jsx("path",{d:"M139.2 193v-1.8c5-.4 10.2-.5 13.4-5 3.8-5.2 3.2-15.4 3.2-21.5V78.5l-47.3 120.4L61.2 81.2v61.1c0 13.6.5 35.1 12.5 44.2 4.3 3.2 9 3.9 14.2 4.7v1.8H31.1v-1.8c1.6-.4 3.2-.7 4.8-1.1 22.6-5.7 22.9-32.4 22.9-51.1v-37.8c0-6.1.5-13.3-3.2-18.5-4.5-6.1-13.4-7.2-20.4-7.5v-1.8H96l29.6 75.4 29.9-75.4h52.3v1.8c-4.8.4-10.2.9-13.4 5-3.8 4.8-3.2 15.9-3.2 21.9v62.5c0 6.3-.7 16.1 3.2 21.5 3.2 4.3 6.2 4.7 11.2 5v1.8h-66.4z",style:{fill:"url(#d)"}}),jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"e",x1:30.453,x2:213.794,y1:63.629,y2:63.629,children:[jsx("stop",{offset:0,style:{stopColor:"#e6b711"}}),jsx("stop",{offset:.128,style:{stopColor:"#eac23c"}}),jsx("stop",{offset:.278,style:{stopColor:"#ec6"}}),jsx("stop",{offset:.413,style:{stopColor:"#f1d485"}}),jsx("stop",{offset:.527,style:{stopColor:"#f2d998"}}),jsx("stop",{offset:.607,style:{stopColor:"#f3db9f"}}),jsx("stop",{offset:1,style:{stopColor:"#e6b711"}})]}),jsx("path",{d:"M30.5 60.6h183.3v6.1H30.5z",style:{fill:"url(#e)"}}),jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"f",x1:196.676,x2:225.538,y1:132.923,y2:132.923,children:[jsx("stop",{offset:0,style:{stopColor:"#e6b711"}}),jsx("stop",{offset:.128,style:{stopColor:"#eac23c"}}),jsx("stop",{offset:.278,style:{stopColor:"#ec6"}}),jsx("stop",{offset:.413,style:{stopColor:"#f1d485"}}),jsx("stop",{offset:.527,style:{stopColor:"#f2d998"}}),jsx("stop",{offset:.607,style:{stopColor:"#f3db9f"}}),jsx("stop",{offset:1,style:{stopColor:"#e6b711"}})]}),jsx("path",{d:"M196.7 177.5c11.5-15.6 18.7-35.2 18.7-56 0-14.1-3.1-27.5-8.8-39.5h11.1c5 12.2 7.8 25.5 7.8 39.5 0 23.4-7.8 45-20.9 62.4l-7.9-6.4z",style:{fill:"url(#f)"}})]});const UserBadge=props=>{const{aria:aria={},badge:badge="million-dollar",className:className,data:data={},htmlOptions:htmlOptions={},id:id,size:size="md"}=props;const image=badge==="million-dollar"?jsx(MillionDollar,{}):jsx(Veteran,{});const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_user_badge_kit",size),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsx("div",{className:"pb_user_badge_wrapper",children:image})})};function isOfType$4(type){return value=>typeof value===type}var isFunction$2=isOfType$4("function");var isNull$1=value=>value===null;var isRegex$1=value=>Object.prototype.toString.call(value).slice(8,-1)==="RegExp";var isObject$1=value=>!isUndefined$1(value)&&!isNull$1(value)&&(isFunction$2(value)||typeof value==="object");var isUndefined$1=isOfType$4("undefined");function equalArray$1(left,right){const{length:length}=left;if(length!==right.length){return false}for(let index=length;index--!==0;){if(!equal$1(left[index],right[index])){return false}}return true}function equalArrayBuffer$1(left,right){if(left.byteLength!==right.byteLength){return false}const view1=new DataView(left.buffer);const view2=new DataView(right.buffer);let index=left.byteLength;while(index--){if(view1.getUint8(index)!==view2.getUint8(index)){return false}}return true}function equalMap$1(left,right){if(left.size!==right.size){return false}for(const index of left.entries()){if(!right.has(index[0])){return false}}for(const index of left.entries()){if(!equal$1(index[1],right.get(index[0]))){return false}}return true}function equalSet$1(left,right){if(left.size!==right.size){return false}for(const index of left.entries()){if(!right.has(index[0])){return false}}return true}function equal$1(left,right){if(left===right){return true}if(left&&isObject$1(left)&&right&&isObject$1(right)){if(left.constructor!==right.constructor){return false}if(Array.isArray(left)&&Array.isArray(right)){return equalArray$1(left,right)}if(left instanceof Map&&right instanceof Map){return equalMap$1(left,right)}if(left instanceof Set&&right instanceof Set){return equalSet$1(left,right)}if(ArrayBuffer.isView(left)&&ArrayBuffer.isView(right)){return equalArrayBuffer$1(left,right)}if(isRegex$1(left)&&isRegex$1(right)){return left.source===right.source&&left.flags===right.flags}if(left.valueOf!==Object.prototype.valueOf){return left.valueOf()===right.valueOf()}if(left.toString!==Object.prototype.toString){return left.toString()===right.toString()}const leftKeys=Object.keys(left);const rightKeys=Object.keys(right);if(leftKeys.length!==rightKeys.length){return false}for(let index=leftKeys.length;index--!==0;){if(!Object.prototype.hasOwnProperty.call(right,leftKeys[index])){return false}}for(let index=leftKeys.length;index--!==0;){const key=leftKeys[index];if(key==="_owner"&&left.$$typeof){continue}if(!equal$1(left[key],right[key])){return false}}return true}if(Number.isNaN(left)&&Number.isNaN(right)){return true}return left===right}var objectTypes$2=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"];var primitiveTypes$2=["bigint","boolean","null","number","string","symbol","undefined"];function getObjectType$2(value){const objectTypeName=Object.prototype.toString.call(value).slice(8,-1);if(/HTML\w+Element/.test(objectTypeName)){return"HTMLElement"}if(isObjectType$2(objectTypeName)){return objectTypeName}return void 0}function isObjectOfType$2(type){return value=>getObjectType$2(value)===type}function isObjectType$2(name){return objectTypes$2.includes(name)}function isOfType$3(type){return value=>typeof value===type}function isPrimitiveType$2(name){return primitiveTypes$2.includes(name)}var DOM_PROPERTIES_TO_CHECK$2=["innerHTML","ownerDocument","style","attributes","nodeValue"];function is$2(value){if(value===null){return"null"}switch(typeof value){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(is$2.array(value)){return"Array"}if(is$2.plainFunction(value)){return"Function"}const tagType=getObjectType$2(value);if(tagType){return tagType}return"Object"}is$2.array=Array.isArray;is$2.arrayOf=(target,predicate)=>{if(!is$2.array(target)&&!is$2.function(predicate)){return false}return target.every((d=>predicate(d)))};is$2.asyncGeneratorFunction=value=>getObjectType$2(value)==="AsyncGeneratorFunction";is$2.asyncFunction=isObjectOfType$2("AsyncFunction");is$2.bigint=isOfType$3("bigint");is$2.boolean=value=>value===true||value===false;is$2.date=isObjectOfType$2("Date");is$2.defined=value=>!is$2.undefined(value);is$2.domElement=value=>is$2.object(value)&&!is$2.plainObject(value)&&value.nodeType===1&&is$2.string(value.nodeName)&&DOM_PROPERTIES_TO_CHECK$2.every((property=>property in value));is$2.empty=value=>is$2.string(value)&&value.length===0||is$2.array(value)&&value.length===0||is$2.object(value)&&!is$2.map(value)&&!is$2.set(value)&&Object.keys(value).length===0||is$2.set(value)&&value.size===0||is$2.map(value)&&value.size===0;is$2.error=isObjectOfType$2("Error");is$2.function=isOfType$3("function");is$2.generator=value=>is$2.iterable(value)&&is$2.function(value.next)&&is$2.function(value.throw);is$2.generatorFunction=isObjectOfType$2("GeneratorFunction");is$2.instanceOf=(instance,class_)=>{if(!instance||!class_){return false}return Object.getPrototypeOf(instance)===class_.prototype};is$2.iterable=value=>!is$2.nullOrUndefined(value)&&is$2.function(value[Symbol.iterator]);is$2.map=isObjectOfType$2("Map");is$2.nan=value=>Number.isNaN(value);is$2.null=value=>value===null;is$2.nullOrUndefined=value=>is$2.null(value)||is$2.undefined(value);is$2.number=value=>isOfType$3("number")(value)&&!is$2.nan(value);is$2.numericString=value=>is$2.string(value)&&value.length>0&&!Number.isNaN(Number(value));is$2.object=value=>!is$2.nullOrUndefined(value)&&(is$2.function(value)||typeof value==="object");is$2.oneOf=(target,value)=>{if(!is$2.array(target)){return false}return target.indexOf(value)>-1};is$2.plainFunction=isObjectOfType$2("Function");is$2.plainObject=value=>{if(getObjectType$2(value)!=="Object"){return false}const prototype=Object.getPrototypeOf(value);return prototype===null||prototype===Object.getPrototypeOf({})};is$2.primitive=value=>is$2.null(value)||isPrimitiveType$2(typeof value);is$2.promise=isObjectOfType$2("Promise");is$2.propertyOf=(target,key,predicate)=>{if(!is$2.object(target)||!key){return false}const value=target[key];if(is$2.function(predicate)){return predicate(value)}return is$2.defined(value)};is$2.regexp=isObjectOfType$2("RegExp");is$2.set=isObjectOfType$2("Set");is$2.string=isOfType$3("string");is$2.symbol=isOfType$3("symbol");is$2.undefined=isOfType$3("undefined");is$2.weakMap=isObjectOfType$2("WeakMap");is$2.weakSet=isObjectOfType$2("WeakSet");var src_default$1=is$2;var objectTypes$1=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"];var primitiveTypes$1=["bigint","boolean","null","number","string","symbol","undefined"];function getObjectType$1(value){const objectTypeName=Object.prototype.toString.call(value).slice(8,-1);if(/HTML\w+Element/.test(objectTypeName)){return"HTMLElement"}if(isObjectType$1(objectTypeName)){return objectTypeName}return void 0}function isObjectOfType$1(type){return value=>getObjectType$1(value)===type}function isObjectType$1(name){return objectTypes$1.includes(name)}function isOfType$2(type){return value=>typeof value===type}function isPrimitiveType$1(name){return primitiveTypes$1.includes(name)}var DOM_PROPERTIES_TO_CHECK$1=["innerHTML","ownerDocument","style","attributes","nodeValue"];function is$1(value){if(value===null){return"null"}switch(typeof value){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(is$1.array(value)){return"Array"}if(is$1.plainFunction(value)){return"Function"}const tagType=getObjectType$1(value);if(tagType){return tagType}return"Object"}is$1.array=Array.isArray;is$1.arrayOf=(target,predicate)=>{if(!is$1.array(target)&&!is$1.function(predicate)){return false}return target.every((d=>predicate(d)))};is$1.asyncGeneratorFunction=value=>getObjectType$1(value)==="AsyncGeneratorFunction";is$1.asyncFunction=isObjectOfType$1("AsyncFunction");is$1.bigint=isOfType$2("bigint");is$1.boolean=value=>value===true||value===false;is$1.date=isObjectOfType$1("Date");is$1.defined=value=>!is$1.undefined(value);is$1.domElement=value=>is$1.object(value)&&!is$1.plainObject(value)&&value.nodeType===1&&is$1.string(value.nodeName)&&DOM_PROPERTIES_TO_CHECK$1.every((property=>property in value));is$1.empty=value=>is$1.string(value)&&value.length===0||is$1.array(value)&&value.length===0||is$1.object(value)&&!is$1.map(value)&&!is$1.set(value)&&Object.keys(value).length===0||is$1.set(value)&&value.size===0||is$1.map(value)&&value.size===0;is$1.error=isObjectOfType$1("Error");is$1.function=isOfType$2("function");is$1.generator=value=>is$1.iterable(value)&&is$1.function(value.next)&&is$1.function(value.throw);is$1.generatorFunction=isObjectOfType$1("GeneratorFunction");is$1.instanceOf=(instance,class_)=>{if(!instance||!class_){return false}return Object.getPrototypeOf(instance)===class_.prototype};is$1.iterable=value=>!is$1.nullOrUndefined(value)&&is$1.function(value[Symbol.iterator]);is$1.map=isObjectOfType$1("Map");is$1.nan=value=>Number.isNaN(value);is$1.null=value=>value===null;is$1.nullOrUndefined=value=>is$1.null(value)||is$1.undefined(value);is$1.number=value=>isOfType$2("number")(value)&&!is$1.nan(value);is$1.numericString=value=>is$1.string(value)&&value.length>0&&!Number.isNaN(Number(value));is$1.object=value=>!is$1.nullOrUndefined(value)&&(is$1.function(value)||typeof value==="object");is$1.oneOf=(target,value)=>{if(!is$1.array(target)){return false}return target.indexOf(value)>-1};is$1.plainFunction=isObjectOfType$1("Function");is$1.plainObject=value=>{if(getObjectType$1(value)!=="Object"){return false}const prototype=Object.getPrototypeOf(value);return prototype===null||prototype===Object.getPrototypeOf({})};is$1.primitive=value=>is$1.null(value)||isPrimitiveType$1(typeof value);is$1.promise=isObjectOfType$1("Promise");is$1.propertyOf=(target,key,predicate)=>{if(!is$1.object(target)||!key){return false}const value=target[key];if(is$1.function(predicate)){return predicate(value)}return is$1.defined(value)};is$1.regexp=isObjectOfType$1("RegExp");is$1.set=isObjectOfType$1("Set");is$1.string=isOfType$2("string");is$1.symbol=isOfType$2("symbol");is$1.undefined=isOfType$2("undefined");is$1.weakMap=isObjectOfType$1("WeakMap");is$1.weakSet=isObjectOfType$1("WeakSet");var src_default=is$1;function canHaveLength$1(...arguments_){return arguments_.every((d=>src_default.string(d)||src_default.array(d)||src_default.plainObject(d)))}function checkEquality$1(left,right,value){if(!isSameType$1(left,right)){return false}if([left,right].every(src_default.array)){return!left.some(hasValue$1(value))&&right.some(hasValue$1(value))}if([left,right].every(src_default.plainObject)){return!Object.entries(left).some(hasEntry$1(value))&&Object.entries(right).some(hasEntry$1(value))}return right===value}function compareNumbers$1(previousData,data,options){const{actual:actual,key:key,previous:previous,type:type}=options;const left=nested$1(previousData,key);const right=nested$1(data,key);let changed=[left,right].every(src_default.number)&&(type==="increased"?left<right:left>right);if(!src_default.undefined(actual)){changed=changed&&right===actual}if(!src_default.undefined(previous)){changed=changed&&left===previous}return changed}function compareValues$1(previousData,data,options){const{key:key,type:type,value:value}=options;const left=nested$1(previousData,key);const right=nested$1(data,key);const primary=type==="added"?left:right;const secondary=type==="added"?right:left;if(!src_default.nullOrUndefined(value)){if(src_default.defined(primary)){if(src_default.array(primary)||src_default.plainObject(primary)){return checkEquality$1(primary,secondary,value)}}else{return equal$1(secondary,value)}return false}if([left,right].every(src_default.array)){return!secondary.every(isEqualPredicate$1(primary))}if([left,right].every(src_default.plainObject)){return hasExtraKeys$1(Object.keys(primary),Object.keys(secondary))}return![left,right].every((d=>src_default.primitive(d)&&src_default.defined(d)))&&(type==="added"?!src_default.defined(left)&&src_default.defined(right):src_default.defined(left)&&!src_default.defined(right))}function getIterables$1(previousData,data,{key:key}={}){let left=nested$1(previousData,key);let right=nested$1(data,key);if(!isSameType$1(left,right)){throw new TypeError("Inputs have different types")}if(!canHaveLength$1(left,right)){throw new TypeError("Inputs don't have length")}if([left,right].every(src_default.plainObject)){left=Object.keys(left);right=Object.keys(right)}return[left,right]}function hasEntry$1(input){return([key,value])=>{if(src_default.array(input)){return equal$1(input,value)||input.some((d=>equal$1(d,value)||src_default.array(value)&&isEqualPredicate$1(value)(d)))}if(src_default.plainObject(input)&&input[key]){return!!input[key]&&equal$1(input[key],value)}return equal$1(input,value)}}function hasExtraKeys$1(left,right){return right.some((d=>!left.includes(d)))}function hasValue$1(input){return value=>{if(src_default.array(input)){return input.some((d=>equal$1(d,value)||src_default.array(value)&&isEqualPredicate$1(value)(d)))}return equal$1(input,value)}}function includesOrEqualsTo$1(previousValue,value){return src_default.array(previousValue)?previousValue.some((d=>equal$1(d,value))):equal$1(previousValue,value)}function isEqualPredicate$1(data){return value=>data.some((d=>equal$1(d,value)))}function isSameType$1(...arguments_){return arguments_.every(src_default.array)||arguments_.every(src_default.number)||arguments_.every(src_default.plainObject)||arguments_.every(src_default.string)}function nested$1(data,property){if(src_default.plainObject(data)||src_default.array(data)){if(src_default.string(property)){const props=property.split(".");return props.reduce(((acc,d)=>acc&&acc[d]),data)}if(src_default.number(property)){return data[property]}return data}return data}function treeChanges$1(previousData,data){if([previousData,data].some(src_default.nullOrUndefined)){throw new Error("Missing required parameters")}if(![previousData,data].every((d=>src_default.plainObject(d)||src_default.array(d)))){throw new Error("Expected plain objects or array")}const added=(key,value)=>{try{return compareValues$1(previousData,data,{key:key,type:"added",value:value})}catch{return false}};const changed=(key,actual,previous)=>{try{const left=nested$1(previousData,key);const right=nested$1(data,key);const hasActual=src_default.defined(actual);const hasPrevious=src_default.defined(previous);if(hasActual||hasPrevious){const leftComparator=hasPrevious?includesOrEqualsTo$1(previous,left):!includesOrEqualsTo$1(actual,left);const rightComparator=includesOrEqualsTo$1(actual,right);return leftComparator&&rightComparator}if([left,right].every(src_default.array)||[left,right].every(src_default.plainObject)){return!equal$1(left,right)}return left!==right}catch{return false}};const changedFrom=(key,previous,actual)=>{if(!src_default.defined(key)){return false}try{const left=nested$1(previousData,key);const right=nested$1(data,key);const hasActual=src_default.defined(actual);return includesOrEqualsTo$1(previous,left)&&(hasActual?includesOrEqualsTo$1(actual,right):!hasActual)}catch{return false}};const decreased=(key,actual,previous)=>{if(!src_default.defined(key)){return false}try{return compareNumbers$1(previousData,data,{key:key,actual:actual,previous:previous,type:"decreased"})}catch{return false}};const emptied=key=>{try{const[left,right]=getIterables$1(previousData,data,{key:key});return!!left.length&&!right.length}catch{return false}};const filled=key=>{try{const[left,right]=getIterables$1(previousData,data,{key:key});return!left.length&&!!right.length}catch{return false}};const increased=(key,actual,previous)=>{if(!src_default.defined(key)){return false}try{return compareNumbers$1(previousData,data,{key:key,actual:actual,previous:previous,type:"increased"})}catch{return false}};const removed=(key,value)=>{try{return compareValues$1(previousData,data,{key:key,type:"removed",value:value})}catch{return false}};return{added:added,changed:changed,changedFrom:changedFrom,decreased:decreased,emptied:emptied,filled:filled,increased:increased,removed:removed}}var E_NOSCROLL=new Error("Element already at target scroll position");var E_CANCELLED=new Error("Scroll cancelled");var min=Math.min;var ms=Date.now;var scroll={left:make("scrollLeft"),top:make("scrollTop")};function make(prop){return function scroll2(el,to,opts,cb){opts=opts||{};if(typeof opts=="function")cb=opts,opts={};if(typeof cb!="function")cb=noop$2;var start=ms();var from=el[prop];var ease=opts.ease||inOutSine;var duration=!isNaN(opts.duration)?+opts.duration:350;var cancelled=false;return from===to?cb(E_NOSCROLL,el[prop]):requestAnimationFrame(animate2),cancel;function cancel(){cancelled=true}function animate2(timestamp){if(cancelled)return cb(E_CANCELLED,el[prop]);var now=ms();var time=min(1,(now-start)/duration);var eased=ease(time);el[prop]=eased*(to-from)+from;time<1?requestAnimationFrame(animate2):requestAnimationFrame((function(){cb(null,el[prop])}))}}}function inOutSine(n){return.5*(1-Math.cos(Math.PI*n))}function noop$2(){}const scroll$1=getDefaultExportFromCjs(scroll);var scrollparent={exports:{}};(function(module){(function(root,factory){if(module.exports){module.exports=factory()}else{root.Scrollparent=factory()}})(commonjsGlobal,(function(){function isScrolling(node){var overflow=getComputedStyle(node,null).getPropertyValue("overflow");return overflow.indexOf("scroll")>-1||overflow.indexOf("auto")>-1}function scrollParent2(node){if(!(node instanceof HTMLElement||node instanceof SVGElement)){return void 0}var current=node.parentNode;while(current.parentNode){if(isScrolling(current)){return current}current=current.parentNode}return document.scrollingElement||document.documentElement}return scrollParent2}))})(scrollparent);var scrollparentExports=scrollparent.exports;const scrollParent=getDefaultExportFromCjs(scrollparentExports);var isMergeableObject=function isMergeableObject2(value){return isNonNullObject(value)&&!isSpecial(value)};function isNonNullObject(value){return!!value&&typeof value==="object"}function isSpecial(value){var stringValue=Object.prototype.toString.call(value);return stringValue==="[object RegExp]"||stringValue==="[object Date]"||isReactElement(value)}var canUseSymbol=typeof Symbol==="function"&&Symbol.for;var REACT_ELEMENT_TYPE=canUseSymbol?Symbol.for("react.element"):60103;function isReactElement(value){return value.$$typeof===REACT_ELEMENT_TYPE}function emptyTarget(val){return Array.isArray(val)?[]:{}}function cloneUnlessOtherwiseSpecified(value,options){return options.clone!==false&&options.isMergeableObject(value)?deepmerge(emptyTarget(value),value,options):value}function defaultArrayMerge(target,source,options){return target.concat(source).map((function(element){return cloneUnlessOtherwiseSpecified(element,options)}))}function getMergeFunction(key,options){if(!options.customMerge){return deepmerge}var customMerge=options.customMerge(key);return typeof customMerge==="function"?customMerge:deepmerge}function getEnumerableOwnPropertySymbols(target){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(target).filter((function(symbol){return Object.propertyIsEnumerable.call(target,symbol)})):[]}function getKeys(target){return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))}function propertyIsOnObject(object,property){try{return property in object}catch(_){return false}}function propertyIsUnsafe(target,key){return propertyIsOnObject(target,key)&&!(Object.hasOwnProperty.call(target,key)&&Object.propertyIsEnumerable.call(target,key))}function mergeObject(target,source,options){var destination={};if(options.isMergeableObject(target)){getKeys(target).forEach((function(key){destination[key]=cloneUnlessOtherwiseSpecified(target[key],options)}))}getKeys(source).forEach((function(key){if(propertyIsUnsafe(target,key)){return}if(propertyIsOnObject(target,key)&&options.isMergeableObject(source[key])){destination[key]=getMergeFunction(key,options)(target[key],source[key],options)}else{destination[key]=cloneUnlessOtherwiseSpecified(source[key],options)}}));return destination}function deepmerge(target,source,options){options=options||{};options.arrayMerge=options.arrayMerge||defaultArrayMerge;options.isMergeableObject=options.isMergeableObject||isMergeableObject;options.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var sourceIsArray=Array.isArray(source);var targetIsArray=Array.isArray(target);var sourceAndTargetTypesMatch=sourceIsArray===targetIsArray;if(!sourceAndTargetTypesMatch){return cloneUnlessOtherwiseSpecified(source,options)}else if(sourceIsArray){return options.arrayMerge(target,source,options)}else{return mergeObject(target,source,options)}}deepmerge.all=function deepmergeAll(array,options){if(!Array.isArray(array)){throw new Error("first argument should be an array")}return array.reduce((function(prev,next){return deepmerge(prev,next,options)}),{})};var deepmerge_1=deepmerge;var cjs=deepmerge_1;const deepmerge2=getDefaultExportFromCjs(cjs);
|
22
|
+
/**!
|
23
|
+
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
24
|
+
* @version 1.16.1
|
25
|
+
* @license
|
26
|
+
* Copyright (c) 2016 Federico Zivolo and contributors
|
27
|
+
*
|
28
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
29
|
+
* of this software and associated documentation files (the "Software"), to deal
|
30
|
+
* in the Software without restriction, including without limitation the rights
|
31
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
32
|
+
* copies of the Software, and to permit persons to whom the Software is
|
33
|
+
* furnished to do so, subject to the following conditions:
|
34
|
+
*
|
35
|
+
* The above copyright notice and this permission notice shall be included in all
|
36
|
+
* copies or substantial portions of the Software.
|
37
|
+
*
|
38
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
39
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
40
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
41
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
42
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
43
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
44
|
+
* SOFTWARE.
|
45
|
+
*/var isBrowser=typeof window!=="undefined"&&typeof document!=="undefined"&&typeof navigator!=="undefined";var timeoutDuration=function(){var longerTimeoutBrowsers=["Edge","Trident","Firefox"];for(var i=0;i<longerTimeoutBrowsers.length;i+=1){if(isBrowser&&navigator.userAgent.indexOf(longerTimeoutBrowsers[i])>=0){return 1}}return 0}();function microtaskDebounce(fn){var called=false;return function(){if(called){return}called=true;window.Promise.resolve().then((function(){called=false;fn()}))}}function taskDebounce(fn){var scheduled=false;return function(){if(!scheduled){scheduled=true;setTimeout((function(){scheduled=false;fn()}),timeoutDuration)}}}var supportsMicroTasks=isBrowser&&window.Promise;var debounce=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction$1(functionToCheck){var getType={};return functionToCheck&&getType.toString.call(functionToCheck)==="[object Function]"}function getStyleComputedProperty$1(element,property){if(element.nodeType!==1){return[]}var window2=element.ownerDocument.defaultView;var css=window2.getComputedStyle(element,null);return property?css[property]:css}function getParentNode(element){if(element.nodeName==="HTML"){return element}return element.parentNode||element.host}function getScrollParent$1(element){if(!element){return document.body}switch(element.nodeName){case"HTML":case"BODY":return element.ownerDocument.body;case"#document":return element.body}var _getStyleComputedProp=getStyleComputedProperty$1(element),overflow=_getStyleComputedProp.overflow,overflowX=_getStyleComputedProp.overflowX,overflowY=_getStyleComputedProp.overflowY;if(/(auto|scroll|overlay)/.test(overflow+overflowY+overflowX)){return element}return getScrollParent$1(getParentNode(element))}function getReferenceNode(reference){return reference&&reference.referenceNode?reference.referenceNode:reference}var isIE11=isBrowser&&!!(window.MSInputMethodContext&&document.documentMode);var isIE10=isBrowser&&/MSIE 10/.test(navigator.userAgent);function isIE(version){if(version===11){return isIE11}if(version===10){return isIE10}return isIE11||isIE10}function getOffsetParent(element){if(!element){return document.documentElement}var noOffsetParent=isIE(10)?document.body:null;var offsetParent=element.offsetParent||null;while(offsetParent===noOffsetParent&&element.nextElementSibling){offsetParent=(element=element.nextElementSibling).offsetParent}var nodeName=offsetParent&&offsetParent.nodeName;if(!nodeName||nodeName==="BODY"||nodeName==="HTML"){return element?element.ownerDocument.documentElement:document.documentElement}if(["TH","TD","TABLE"].indexOf(offsetParent.nodeName)!==-1&&getStyleComputedProperty$1(offsetParent,"position")==="static"){return getOffsetParent(offsetParent)}return offsetParent}function isOffsetContainer(element){var nodeName=element.nodeName;if(nodeName==="BODY"){return false}return nodeName==="HTML"||getOffsetParent(element.firstElementChild)===element}function getRoot(node){if(node.parentNode!==null){return getRoot(node.parentNode)}return node}function findCommonOffsetParent(element1,element2){if(!element1||!element1.nodeType||!element2||!element2.nodeType){return document.documentElement}var order=element1.compareDocumentPosition(element2)&Node.DOCUMENT_POSITION_FOLLOWING;var start=order?element1:element2;var end=order?element2:element1;var range=document.createRange();range.setStart(start,0);range.setEnd(end,0);var commonAncestorContainer=range.commonAncestorContainer;if(element1!==commonAncestorContainer&&element2!==commonAncestorContainer||start.contains(end)){if(isOffsetContainer(commonAncestorContainer)){return commonAncestorContainer}return getOffsetParent(commonAncestorContainer)}var element1root=getRoot(element1);if(element1root.host){return findCommonOffsetParent(element1root.host,element2)}else{return findCommonOffsetParent(element1,getRoot(element2).host)}}function getScroll(element){var side=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top";var upperSide=side==="top"?"scrollTop":"scrollLeft";var nodeName=element.nodeName;if(nodeName==="BODY"||nodeName==="HTML"){var html=element.ownerDocument.documentElement;var scrollingElement=element.ownerDocument.scrollingElement||html;return scrollingElement[upperSide]}return element[upperSide]}function includeScroll(rect,element){var subtract=arguments.length>2&&arguments[2]!==void 0?arguments[2]:false;var scrollTop=getScroll(element,"top");var scrollLeft=getScroll(element,"left");var modifier=subtract?-1:1;rect.top+=scrollTop*modifier;rect.bottom+=scrollTop*modifier;rect.left+=scrollLeft*modifier;rect.right+=scrollLeft*modifier;return rect}function getBordersSize(styles2,axis){var sideA=axis==="x"?"Left":"Top";var sideB=sideA==="Left"?"Right":"Bottom";return parseFloat(styles2["border"+sideA+"Width"])+parseFloat(styles2["border"+sideB+"Width"])}function getSize(axis,body,html,computedStyle){return Math.max(body["offset"+axis],body["scroll"+axis],html["client"+axis],html["offset"+axis],html["scroll"+axis],isIE(10)?parseInt(html["offset"+axis])+parseInt(computedStyle["margin"+(axis==="Height"?"Top":"Left")])+parseInt(computedStyle["margin"+(axis==="Height"?"Bottom":"Right")]):0)}function getWindowSizes(document2){var body=document2.body;var html=document2.documentElement;var computedStyle=isIE(10)&&getComputedStyle(html);return{height:getSize("Height",body,html,computedStyle),width:getSize("Width",body,html,computedStyle)}}var classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var defineProperty=function(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj};var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};function getClientRect$1(offsets){return _extends({},offsets,{right:offsets.left+offsets.width,bottom:offsets.top+offsets.height})}function getBoundingClientRect(element){var rect={};try{if(isIE(10)){rect=element.getBoundingClientRect();var scrollTop=getScroll(element,"top");var scrollLeft=getScroll(element,"left");rect.top+=scrollTop;rect.left+=scrollLeft;rect.bottom+=scrollTop;rect.right+=scrollLeft}else{rect=element.getBoundingClientRect()}}catch(e){}var result={left:rect.left,top:rect.top,width:rect.right-rect.left,height:rect.bottom-rect.top};var sizes2=element.nodeName==="HTML"?getWindowSizes(element.ownerDocument):{};var width=sizes2.width||element.clientWidth||result.width;var height=sizes2.height||element.clientHeight||result.height;var horizScrollbar=element.offsetWidth-width;var vertScrollbar=element.offsetHeight-height;if(horizScrollbar||vertScrollbar){var styles2=getStyleComputedProperty$1(element);horizScrollbar-=getBordersSize(styles2,"x");vertScrollbar-=getBordersSize(styles2,"y");result.width-=horizScrollbar;result.height-=vertScrollbar}return getClientRect$1(result)}function getOffsetRectRelativeToArbitraryNode(children,parent){var fixedPosition=arguments.length>2&&arguments[2]!==void 0?arguments[2]:false;var isIE102=isIE(10);var isHTML=parent.nodeName==="HTML";var childrenRect=getBoundingClientRect(children);var parentRect=getBoundingClientRect(parent);var scrollParent2=getScrollParent$1(children);var styles2=getStyleComputedProperty$1(parent);var borderTopWidth=parseFloat(styles2.borderTopWidth);var borderLeftWidth=parseFloat(styles2.borderLeftWidth);if(fixedPosition&&isHTML){parentRect.top=Math.max(parentRect.top,0);parentRect.left=Math.max(parentRect.left,0)}var offsets=getClientRect$1({top:childrenRect.top-parentRect.top-borderTopWidth,left:childrenRect.left-parentRect.left-borderLeftWidth,width:childrenRect.width,height:childrenRect.height});offsets.marginTop=0;offsets.marginLeft=0;if(!isIE102&&isHTML){var marginTop=parseFloat(styles2.marginTop);var marginLeft=parseFloat(styles2.marginLeft);offsets.top-=borderTopWidth-marginTop;offsets.bottom-=borderTopWidth-marginTop;offsets.left-=borderLeftWidth-marginLeft;offsets.right-=borderLeftWidth-marginLeft;offsets.marginTop=marginTop;offsets.marginLeft=marginLeft}if(isIE102&&!fixedPosition?parent.contains(scrollParent2):parent===scrollParent2&&scrollParent2.nodeName!=="BODY"){offsets=includeScroll(offsets,parent)}return offsets}function getViewportOffsetRectRelativeToArtbitraryNode(element){var excludeScroll=arguments.length>1&&arguments[1]!==void 0?arguments[1]:false;var html=element.ownerDocument.documentElement;var relativeOffset=getOffsetRectRelativeToArbitraryNode(element,html);var width=Math.max(html.clientWidth,window.innerWidth||0);var height=Math.max(html.clientHeight,window.innerHeight||0);var scrollTop=!excludeScroll?getScroll(html):0;var scrollLeft=!excludeScroll?getScroll(html,"left"):0;var offset2={top:scrollTop-relativeOffset.top+relativeOffset.marginTop,left:scrollLeft-relativeOffset.left+relativeOffset.marginLeft,width:width,height:height};return getClientRect$1(offset2)}function isFixed(element){var nodeName=element.nodeName;if(nodeName==="BODY"||nodeName==="HTML"){return false}if(getStyleComputedProperty$1(element,"position")==="fixed"){return true}var parentNode=getParentNode(element);if(!parentNode){return false}return isFixed(parentNode)}function getFixedPositionOffsetParent(element){if(!element||!element.parentElement||isIE()){return document.documentElement}var el=element.parentElement;while(el&&getStyleComputedProperty$1(el,"transform")==="none"){el=el.parentElement}return el||document.documentElement}function getBoundaries(popper,reference,padding,boundariesElement){var fixedPosition=arguments.length>4&&arguments[4]!==void 0?arguments[4]:false;var boundaries={top:0,left:0};var offsetParent=fixedPosition?getFixedPositionOffsetParent(popper):findCommonOffsetParent(popper,getReferenceNode(reference));if(boundariesElement==="viewport"){boundaries=getViewportOffsetRectRelativeToArtbitraryNode(offsetParent,fixedPosition)}else{var boundariesNode=void 0;if(boundariesElement==="scrollParent"){boundariesNode=getScrollParent$1(getParentNode(reference));if(boundariesNode.nodeName==="BODY"){boundariesNode=popper.ownerDocument.documentElement}}else if(boundariesElement==="window"){boundariesNode=popper.ownerDocument.documentElement}else{boundariesNode=boundariesElement}var offsets=getOffsetRectRelativeToArbitraryNode(boundariesNode,offsetParent,fixedPosition);if(boundariesNode.nodeName==="HTML"&&!isFixed(offsetParent)){var _getWindowSizes=getWindowSizes(popper.ownerDocument),height=_getWindowSizes.height,width=_getWindowSizes.width;boundaries.top+=offsets.top-offsets.marginTop;boundaries.bottom=height+offsets.top;boundaries.left+=offsets.left-offsets.marginLeft;boundaries.right=width+offsets.left}else{boundaries=offsets}}padding=padding||0;var isPaddingNumber=typeof padding==="number";boundaries.left+=isPaddingNumber?padding:padding.left||0;boundaries.top+=isPaddingNumber?padding:padding.top||0;boundaries.right-=isPaddingNumber?padding:padding.right||0;boundaries.bottom-=isPaddingNumber?padding:padding.bottom||0;return boundaries}function getArea(_ref){var width=_ref.width,height=_ref.height;return width*height}function computeAutoPlacement(placement,refRect,popper,reference,boundariesElement){var padding=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(placement.indexOf("auto")===-1){return placement}var boundaries=getBoundaries(popper,reference,padding,boundariesElement);var rects={top:{width:boundaries.width,height:refRect.top-boundaries.top},right:{width:boundaries.right-refRect.right,height:boundaries.height},bottom:{width:boundaries.width,height:boundaries.bottom-refRect.bottom},left:{width:refRect.left-boundaries.left,height:boundaries.height}};var sortedAreas=Object.keys(rects).map((function(key){return _extends({key:key},rects[key],{area:getArea(rects[key])})})).sort((function(a,b){return b.area-a.area}));var filteredAreas=sortedAreas.filter((function(_ref2){var width=_ref2.width,height=_ref2.height;return width>=popper.clientWidth&&height>=popper.clientHeight}));var computedPlacement=filteredAreas.length>0?filteredAreas[0].key:sortedAreas[0].key;var variation=placement.split("-")[1];return computedPlacement+(variation?"-"+variation:"")}function getReferenceOffsets(state,popper,reference){var fixedPosition=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;var commonOffsetParent=fixedPosition?getFixedPositionOffsetParent(popper):findCommonOffsetParent(popper,getReferenceNode(reference));return getOffsetRectRelativeToArbitraryNode(reference,commonOffsetParent,fixedPosition)}function getOuterSizes(element){var window2=element.ownerDocument.defaultView;var styles2=window2.getComputedStyle(element);var x=parseFloat(styles2.marginTop||0)+parseFloat(styles2.marginBottom||0);var y=parseFloat(styles2.marginLeft||0)+parseFloat(styles2.marginRight||0);var result={width:element.offsetWidth+y,height:element.offsetHeight+x};return result}function getOppositePlacement(placement){var hash={left:"right",right:"left",bottom:"top",top:"bottom"};return placement.replace(/left|right|bottom|top/g,(function(matched){return hash[matched]}))}function getPopperOffsets(popper,referenceOffsets,placement){placement=placement.split("-")[0];var popperRect=getOuterSizes(popper);var popperOffsets={width:popperRect.width,height:popperRect.height};var isHoriz=["right","left"].indexOf(placement)!==-1;var mainSide=isHoriz?"top":"left";var secondarySide=isHoriz?"left":"top";var measurement=isHoriz?"height":"width";var secondaryMeasurement=!isHoriz?"height":"width";popperOffsets[mainSide]=referenceOffsets[mainSide]+referenceOffsets[measurement]/2-popperRect[measurement]/2;if(placement===secondarySide){popperOffsets[secondarySide]=referenceOffsets[secondarySide]-popperRect[secondaryMeasurement]}else{popperOffsets[secondarySide]=referenceOffsets[getOppositePlacement(secondarySide)]}return popperOffsets}function find(arr,check){if(Array.prototype.find){return arr.find(check)}return arr.filter(check)[0]}function findIndex(arr,prop,value){if(Array.prototype.findIndex){return arr.findIndex((function(cur){return cur[prop]===value}))}var match=find(arr,(function(obj){return obj[prop]===value}));return arr.indexOf(match)}function runModifiers(modifiers2,data,ends){var modifiersToRun=ends===void 0?modifiers2:modifiers2.slice(0,findIndex(modifiers2,"name",ends));modifiersToRun.forEach((function(modifier){if(modifier["function"]){console.warn("`modifier.function` is deprecated, use `modifier.fn`!")}var fn=modifier["function"]||modifier.fn;if(modifier.enabled&&isFunction$1(fn)){data.offsets.popper=getClientRect$1(data.offsets.popper);data.offsets.reference=getClientRect$1(data.offsets.reference);data=fn(data,modifier)}}));return data}function update(){if(this.state.isDestroyed){return}var data={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:false,offsets:{}};data.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed);data.placement=computeAutoPlacement(this.options.placement,data.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding);data.originalPlacement=data.placement;data.positionFixed=this.options.positionFixed;data.offsets.popper=getPopperOffsets(this.popper,data.offsets.reference,data.placement);data.offsets.popper.position=this.options.positionFixed?"fixed":"absolute";data=runModifiers(this.modifiers,data);if(!this.state.isCreated){this.state.isCreated=true;this.options.onCreate(data)}else{this.options.onUpdate(data)}}function isModifierEnabled(modifiers2,modifierName){return modifiers2.some((function(_ref){var name=_ref.name,enabled=_ref.enabled;return enabled&&name===modifierName}))}function getSupportedPropertyName(property){var prefixes=[false,"ms","Webkit","Moz","O"];var upperProp=property.charAt(0).toUpperCase()+property.slice(1);for(var i=0;i<prefixes.length;i++){var prefix=prefixes[i];var toCheck=prefix?""+prefix+upperProp:property;if(typeof document.body.style[toCheck]!=="undefined"){return toCheck}}return null}function destroy(){this.state.isDestroyed=true;if(isModifierEnabled(this.modifiers,"applyStyle")){this.popper.removeAttribute("x-placement");this.popper.style.position="";this.popper.style.top="";this.popper.style.left="";this.popper.style.right="";this.popper.style.bottom="";this.popper.style.willChange="";this.popper.style[getSupportedPropertyName("transform")]=""}this.disableEventListeners();if(this.options.removeOnDestroy){this.popper.parentNode.removeChild(this.popper)}return this}function getWindow(element){var ownerDocument=element.ownerDocument;return ownerDocument?ownerDocument.defaultView:window}function attachToScrollParents(scrollParent2,event,callback,scrollParents){var isBody=scrollParent2.nodeName==="BODY";var target=isBody?scrollParent2.ownerDocument.defaultView:scrollParent2;target.addEventListener(event,callback,{passive:true});if(!isBody){attachToScrollParents(getScrollParent$1(target.parentNode),event,callback,scrollParents)}scrollParents.push(target)}function setupEventListeners(reference,options,state,updateBound){state.updateBound=updateBound;getWindow(reference).addEventListener("resize",state.updateBound,{passive:true});var scrollElement=getScrollParent$1(reference);attachToScrollParents(scrollElement,"scroll",state.updateBound,state.scrollParents);state.scrollElement=scrollElement;state.eventsEnabled=true;return state}function enableEventListeners(){if(!this.state.eventsEnabled){this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate)}}function removeEventListeners(reference,state){getWindow(reference).removeEventListener("resize",state.updateBound);state.scrollParents.forEach((function(target){target.removeEventListener("scroll",state.updateBound)}));state.updateBound=null;state.scrollParents=[];state.scrollElement=null;state.eventsEnabled=false;return state}function disableEventListeners(){if(this.state.eventsEnabled){cancelAnimationFrame(this.scheduleUpdate);this.state=removeEventListeners(this.reference,this.state)}}function isNumeric(n){return n!==""&&!isNaN(parseFloat(n))&&isFinite(n)}function setStyles(element,styles2){Object.keys(styles2).forEach((function(prop){var unit="";if(["width","height","top","right","bottom","left"].indexOf(prop)!==-1&&isNumeric(styles2[prop])){unit="px"}element.style[prop]=styles2[prop]+unit}))}function setAttributes(element,attributes){Object.keys(attributes).forEach((function(prop){var value=attributes[prop];if(value!==false){element.setAttribute(prop,attributes[prop])}else{element.removeAttribute(prop)}}))}function applyStyle(data){setStyles(data.instance.popper,data.styles);setAttributes(data.instance.popper,data.attributes);if(data.arrowElement&&Object.keys(data.arrowStyles).length){setStyles(data.arrowElement,data.arrowStyles)}return data}function applyStyleOnLoad(reference,popper,options,modifierOptions,state){var referenceOffsets=getReferenceOffsets(state,popper,reference,options.positionFixed);var placement=computeAutoPlacement(options.placement,referenceOffsets,popper,reference,options.modifiers.flip.boundariesElement,options.modifiers.flip.padding);popper.setAttribute("x-placement",placement);setStyles(popper,{position:options.positionFixed?"fixed":"absolute"});return options}function getRoundedOffsets(data,shouldRound){var _data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference;var round=Math.round,floor=Math.floor;var noRound=function noRound2(v){return v};var referenceWidth=round(reference.width);var popperWidth=round(popper.width);var isVertical=["left","right"].indexOf(data.placement)!==-1;var isVariation=data.placement.indexOf("-")!==-1;var sameWidthParity=referenceWidth%2===popperWidth%2;var bothOddWidth=referenceWidth%2===1&&popperWidth%2===1;var horizontalToInteger=!shouldRound?noRound:isVertical||isVariation||sameWidthParity?round:floor;var verticalToInteger=!shouldRound?noRound:round;return{left:horizontalToInteger(bothOddWidth&&!isVariation&&shouldRound?popper.left-1:popper.left),top:verticalToInteger(popper.top),bottom:verticalToInteger(popper.bottom),right:horizontalToInteger(popper.right)}}var isFirefox=isBrowser&&/Firefox/i.test(navigator.userAgent);function computeStyle(data,options){var x=options.x,y=options.y;var popper=data.offsets.popper;var legacyGpuAccelerationOption=find(data.instance.modifiers,(function(modifier){return modifier.name==="applyStyle"})).gpuAcceleration;if(legacyGpuAccelerationOption!==void 0){console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!")}var gpuAcceleration=legacyGpuAccelerationOption!==void 0?legacyGpuAccelerationOption:options.gpuAcceleration;var offsetParent=getOffsetParent(data.instance.popper);var offsetParentRect=getBoundingClientRect(offsetParent);var styles2={position:popper.position};var offsets=getRoundedOffsets(data,window.devicePixelRatio<2||!isFirefox);var sideA=x==="bottom"?"top":"bottom";var sideB=y==="right"?"left":"right";var prefixedProperty=getSupportedPropertyName("transform");var left=void 0,top=void 0;if(sideA==="bottom"){if(offsetParent.nodeName==="HTML"){top=-offsetParent.clientHeight+offsets.bottom}else{top=-offsetParentRect.height+offsets.bottom}}else{top=offsets.top}if(sideB==="right"){if(offsetParent.nodeName==="HTML"){left=-offsetParent.clientWidth+offsets.right}else{left=-offsetParentRect.width+offsets.right}}else{left=offsets.left}if(gpuAcceleration&&prefixedProperty){styles2[prefixedProperty]="translate3d("+left+"px, "+top+"px, 0)";styles2[sideA]=0;styles2[sideB]=0;styles2.willChange="transform"}else{var invertTop=sideA==="bottom"?-1:1;var invertLeft=sideB==="right"?-1:1;styles2[sideA]=top*invertTop;styles2[sideB]=left*invertLeft;styles2.willChange=sideA+", "+sideB}var attributes={"x-placement":data.placement};data.attributes=_extends({},attributes,data.attributes);data.styles=_extends({},styles2,data.styles);data.arrowStyles=_extends({},data.offsets.arrow,data.arrowStyles);return data}function isModifierRequired(modifiers2,requestingName,requestedName){var requesting=find(modifiers2,(function(_ref){var name=_ref.name;return name===requestingName}));var isRequired=!!requesting&&modifiers2.some((function(modifier){return modifier.name===requestedName&&modifier.enabled&&modifier.order<requesting.order}));if(!isRequired){var _requesting="`"+requestingName+"`";var requested="`"+requestedName+"`";console.warn(requested+" modifier is required by "+_requesting+" modifier in order to work, be sure to include it before "+_requesting+"!")}return isRequired}function arrow(data,options){var _data$offsets$arrow;if(!isModifierRequired(data.instance.modifiers,"arrow","keepTogether")){return data}var arrowElement=options.element;if(typeof arrowElement==="string"){arrowElement=data.instance.popper.querySelector(arrowElement);if(!arrowElement){return data}}else{if(!data.instance.popper.contains(arrowElement)){console.warn("WARNING: `arrow.element` must be child of its popper element!");return data}}var placement=data.placement.split("-")[0];var _data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference;var isVertical=["left","right"].indexOf(placement)!==-1;var len=isVertical?"height":"width";var sideCapitalized=isVertical?"Top":"Left";var side=sideCapitalized.toLowerCase();var altSide=isVertical?"left":"top";var opSide=isVertical?"bottom":"right";var arrowElementSize=getOuterSizes(arrowElement)[len];if(reference[opSide]-arrowElementSize<popper[side]){data.offsets.popper[side]-=popper[side]-(reference[opSide]-arrowElementSize)}if(reference[side]+arrowElementSize>popper[opSide]){data.offsets.popper[side]+=reference[side]+arrowElementSize-popper[opSide]}data.offsets.popper=getClientRect$1(data.offsets.popper);var center=reference[side]+reference[len]/2-arrowElementSize/2;var css=getStyleComputedProperty$1(data.instance.popper);var popperMarginSide=parseFloat(css["margin"+sideCapitalized]);var popperBorderSide=parseFloat(css["border"+sideCapitalized+"Width"]);var sideValue=center-data.offsets.popper[side]-popperMarginSide-popperBorderSide;sideValue=Math.max(Math.min(popper[len]-arrowElementSize,sideValue),0);data.arrowElement=arrowElement;data.offsets.arrow=(_data$offsets$arrow={},defineProperty(_data$offsets$arrow,side,Math.round(sideValue)),defineProperty(_data$offsets$arrow,altSide,""),_data$offsets$arrow);return data}function getOppositeVariation(variation){if(variation==="end"){return"start"}else if(variation==="start"){return"end"}return variation}var placements=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"];var validPlacements=placements.slice(3);function clockwise(placement){var counter=arguments.length>1&&arguments[1]!==void 0?arguments[1]:false;var index=validPlacements.indexOf(placement);var arr=validPlacements.slice(index+1).concat(validPlacements.slice(0,index));return counter?arr.reverse():arr}var BEHAVIORS={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip(data,options){if(isModifierEnabled(data.instance.modifiers,"inner")){return data}if(data.flipped&&data.placement===data.originalPlacement){return data}var boundaries=getBoundaries(data.instance.popper,data.instance.reference,options.padding,options.boundariesElement,data.positionFixed);var placement=data.placement.split("-")[0];var placementOpposite=getOppositePlacement(placement);var variation=data.placement.split("-")[1]||"";var flipOrder=[];switch(options.behavior){case BEHAVIORS.FLIP:flipOrder=[placement,placementOpposite];break;case BEHAVIORS.CLOCKWISE:flipOrder=clockwise(placement);break;case BEHAVIORS.COUNTERCLOCKWISE:flipOrder=clockwise(placement,true);break;default:flipOrder=options.behavior}flipOrder.forEach((function(step,index){if(placement!==step||flipOrder.length===index+1){return data}placement=data.placement.split("-")[0];placementOpposite=getOppositePlacement(placement);var popperOffsets=data.offsets.popper;var refOffsets=data.offsets.reference;var floor=Math.floor;var overlapsRef=placement==="left"&&floor(popperOffsets.right)>floor(refOffsets.left)||placement==="right"&&floor(popperOffsets.left)<floor(refOffsets.right)||placement==="top"&&floor(popperOffsets.bottom)>floor(refOffsets.top)||placement==="bottom"&&floor(popperOffsets.top)<floor(refOffsets.bottom);var overflowsLeft=floor(popperOffsets.left)<floor(boundaries.left);var overflowsRight=floor(popperOffsets.right)>floor(boundaries.right);var overflowsTop=floor(popperOffsets.top)<floor(boundaries.top);var overflowsBottom=floor(popperOffsets.bottom)>floor(boundaries.bottom);var overflowsBoundaries=placement==="left"&&overflowsLeft||placement==="right"&&overflowsRight||placement==="top"&&overflowsTop||placement==="bottom"&&overflowsBottom;var isVertical=["top","bottom"].indexOf(placement)!==-1;var flippedVariationByRef=!!options.flipVariations&&(isVertical&&variation==="start"&&overflowsLeft||isVertical&&variation==="end"&&overflowsRight||!isVertical&&variation==="start"&&overflowsTop||!isVertical&&variation==="end"&&overflowsBottom);var flippedVariationByContent=!!options.flipVariationsByContent&&(isVertical&&variation==="start"&&overflowsRight||isVertical&&variation==="end"&&overflowsLeft||!isVertical&&variation==="start"&&overflowsBottom||!isVertical&&variation==="end"&&overflowsTop);var flippedVariation=flippedVariationByRef||flippedVariationByContent;if(overlapsRef||overflowsBoundaries||flippedVariation){data.flipped=true;if(overlapsRef||overflowsBoundaries){placement=flipOrder[index+1]}if(flippedVariation){variation=getOppositeVariation(variation)}data.placement=placement+(variation?"-"+variation:"");data.offsets.popper=_extends({},data.offsets.popper,getPopperOffsets(data.instance.popper,data.offsets.reference,data.placement));data=runModifiers(data.instance.modifiers,data,"flip")}}));return data}function keepTogether(data){var _data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference;var placement=data.placement.split("-")[0];var floor=Math.floor;var isVertical=["top","bottom"].indexOf(placement)!==-1;var side=isVertical?"right":"bottom";var opSide=isVertical?"left":"top";var measurement=isVertical?"width":"height";if(popper[side]<floor(reference[opSide])){data.offsets.popper[opSide]=floor(reference[opSide])-popper[measurement]}if(popper[opSide]>floor(reference[side])){data.offsets.popper[opSide]=floor(reference[side])}return data}function toValue(str,measurement,popperOffsets,referenceOffsets){var split=str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);var value=+split[1];var unit=split[2];if(!value){return str}if(unit.indexOf("%")===0){var element=void 0;switch(unit){case"%p":element=popperOffsets;break;case"%":case"%r":default:element=referenceOffsets}var rect=getClientRect$1(element);return rect[measurement]/100*value}else if(unit==="vh"||unit==="vw"){var size=void 0;if(unit==="vh"){size=Math.max(document.documentElement.clientHeight,window.innerHeight||0)}else{size=Math.max(document.documentElement.clientWidth,window.innerWidth||0)}return size/100*value}else{return value}}function parseOffset(offset2,popperOffsets,referenceOffsets,basePlacement){var offsets=[0,0];var useHeight=["right","left"].indexOf(basePlacement)!==-1;var fragments=offset2.split(/(\+|\-)/).map((function(frag){return frag.trim()}));var divider=fragments.indexOf(find(fragments,(function(frag){return frag.search(/,|\s/)!==-1})));if(fragments[divider]&&fragments[divider].indexOf(",")===-1){console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.")}var splitRegex=/\s*,\s*|\s+/;var ops=divider!==-1?[fragments.slice(0,divider).concat([fragments[divider].split(splitRegex)[0]]),[fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider+1))]:[fragments];ops=ops.map((function(op,index){var measurement=(index===1?!useHeight:useHeight)?"height":"width";var mergeWithPrevious=false;return op.reduce((function(a,b){if(a[a.length-1]===""&&["+","-"].indexOf(b)!==-1){a[a.length-1]=b;mergeWithPrevious=true;return a}else if(mergeWithPrevious){a[a.length-1]+=b;mergeWithPrevious=false;return a}else{return a.concat(b)}}),[]).map((function(str){return toValue(str,measurement,popperOffsets,referenceOffsets)}))}));ops.forEach((function(op,index){op.forEach((function(frag,index2){if(isNumeric(frag)){offsets[index]+=frag*(op[index2-1]==="-"?-1:1)}}))}));return offsets}function offset(data,_ref){var offset2=_ref.offset;var placement=data.placement,_data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference;var basePlacement=placement.split("-")[0];var offsets=void 0;if(isNumeric(+offset2)){offsets=[+offset2,0]}else{offsets=parseOffset(offset2,popper,reference,basePlacement)}if(basePlacement==="left"){popper.top+=offsets[0];popper.left-=offsets[1]}else if(basePlacement==="right"){popper.top+=offsets[0];popper.left+=offsets[1]}else if(basePlacement==="top"){popper.left+=offsets[0];popper.top-=offsets[1]}else if(basePlacement==="bottom"){popper.left+=offsets[0];popper.top+=offsets[1]}data.popper=popper;return data}function preventOverflow(data,options){var boundariesElement=options.boundariesElement||getOffsetParent(data.instance.popper);if(data.instance.reference===boundariesElement){boundariesElement=getOffsetParent(boundariesElement)}var transformProp=getSupportedPropertyName("transform");var popperStyles=data.instance.popper.style;var top=popperStyles.top,left=popperStyles.left,transform=popperStyles[transformProp];popperStyles.top="";popperStyles.left="";popperStyles[transformProp]="";var boundaries=getBoundaries(data.instance.popper,data.instance.reference,options.padding,boundariesElement,data.positionFixed);popperStyles.top=top;popperStyles.left=left;popperStyles[transformProp]=transform;options.boundaries=boundaries;var order=options.priority;var popper=data.offsets.popper;var check={primary:function primary(placement){var value=popper[placement];if(popper[placement]<boundaries[placement]&&!options.escapeWithReference){value=Math.max(popper[placement],boundaries[placement])}return defineProperty({},placement,value)},secondary:function secondary(placement){var mainSide=placement==="right"?"left":"top";var value=popper[mainSide];if(popper[placement]>boundaries[placement]&&!options.escapeWithReference){value=Math.min(popper[mainSide],boundaries[placement]-(placement==="right"?popper.width:popper.height))}return defineProperty({},mainSide,value)}};order.forEach((function(placement){var side=["left","top"].indexOf(placement)!==-1?"primary":"secondary";popper=_extends({},popper,check[side](placement))}));data.offsets.popper=popper;return data}function shift(data){var placement=data.placement;var basePlacement=placement.split("-")[0];var shiftvariation=placement.split("-")[1];if(shiftvariation){var _data$offsets=data.offsets,reference=_data$offsets.reference,popper=_data$offsets.popper;var isVertical=["bottom","top"].indexOf(basePlacement)!==-1;var side=isVertical?"left":"top";var measurement=isVertical?"width":"height";var shiftOffsets={start:defineProperty({},side,reference[side]),end:defineProperty({},side,reference[side]+reference[measurement]-popper[measurement])};data.offsets.popper=_extends({},popper,shiftOffsets[shiftvariation])}return data}function hide(data){if(!isModifierRequired(data.instance.modifiers,"hide","preventOverflow")){return data}var refRect=data.offsets.reference;var bound=find(data.instance.modifiers,(function(modifier){return modifier.name==="preventOverflow"})).boundaries;if(refRect.bottom<bound.top||refRect.left>bound.right||refRect.top>bound.bottom||refRect.right<bound.left){if(data.hide===true){return data}data.hide=true;data.attributes["x-out-of-boundaries"]=""}else{if(data.hide===false){return data}data.hide=false;data.attributes["x-out-of-boundaries"]=false}return data}function inner(data){var placement=data.placement;var basePlacement=placement.split("-")[0];var _data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference;var isHoriz=["left","right"].indexOf(basePlacement)!==-1;var subtractLength=["top","left"].indexOf(basePlacement)===-1;popper[isHoriz?"left":"top"]=reference[basePlacement]-(subtractLength?popper[isHoriz?"width":"height"]:0);data.placement=getOppositePlacement(placement);data.offsets.popper=getClientRect$1(popper);return data}var modifiers={shift:{order:100,enabled:true,fn:shift},offset:{order:200,enabled:true,fn:offset,offset:0},preventOverflow:{order:300,enabled:true,fn:preventOverflow,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:true,fn:keepTogether},arrow:{order:500,enabled:true,fn:arrow,element:"[x-arrow]"},flip:{order:600,enabled:true,fn:flip,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:false,flipVariationsByContent:false},inner:{order:700,enabled:false,fn:inner},hide:{order:800,enabled:true,fn:hide},computeStyle:{order:850,enabled:true,fn:computeStyle,gpuAcceleration:true,x:"bottom",y:"right"},applyStyle:{order:900,enabled:true,fn:applyStyle,onLoad:applyStyleOnLoad,gpuAcceleration:void 0}};var Defaults={placement:"bottom",positionFixed:false,eventsEnabled:true,removeOnDestroy:false,onCreate:function onCreate(){},onUpdate:function onUpdate(){},modifiers:modifiers};var Popper=function(){function Popper2(reference,popper){var _this=this;var options=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};classCallCheck(this,Popper2);this.scheduleUpdate=function(){return requestAnimationFrame(_this.update)};this.update=debounce(this.update.bind(this));this.options=_extends({},Popper2.Defaults,options);this.state={isDestroyed:false,isCreated:false,scrollParents:[]};this.reference=reference&&reference.jquery?reference[0]:reference;this.popper=popper&&popper.jquery?popper[0]:popper;this.options.modifiers={};Object.keys(_extends({},Popper2.Defaults.modifiers,options.modifiers)).forEach((function(name){_this.options.modifiers[name]=_extends({},Popper2.Defaults.modifiers[name]||{},options.modifiers?options.modifiers[name]:{})}));this.modifiers=Object.keys(this.options.modifiers).map((function(name){return _extends({name:name},_this.options.modifiers[name])})).sort((function(a,b){return a.order-b.order}));this.modifiers.forEach((function(modifierOptions){if(modifierOptions.enabled&&isFunction$1(modifierOptions.onLoad)){modifierOptions.onLoad(_this.reference,_this.popper,_this.options,modifierOptions,_this.state)}}));this.update();var eventsEnabled=this.options.eventsEnabled;if(eventsEnabled){this.enableEventListeners()}this.state.eventsEnabled=eventsEnabled}createClass(Popper2,[{key:"update",value:function update$$1(){return update.call(this)}},{key:"destroy",value:function destroy$$1(){return destroy.call(this)}},{key:"enableEventListeners",value:function enableEventListeners$$1(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function disableEventListeners$$1(){return disableEventListeners.call(this)}}]);return Popper2}();Popper.Utils=(typeof window!=="undefined"?window:global).PopperUtils;Popper.placements=placements;Popper.Defaults=Defaults;var DOM_PROPERTIES_TO_CHECK=["innerHTML","ownerDocument","style","attributes","nodeValue"];var objectTypes=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"];var primitiveTypes=["bigint","boolean","null","number","string","symbol","undefined"];function getObjectType(value){var objectTypeName=Object.prototype.toString.call(value).slice(8,-1);if(/HTML\w+Element/.test(objectTypeName)){return"HTMLElement"}if(isObjectType(objectTypeName)){return objectTypeName}return void 0}function isObjectOfType(type){return function(value){return getObjectType(value)===type}}function isObjectType(name){return objectTypes.includes(name)}function isOfType$1(type){return function(value){return typeof value===type}}function isPrimitiveType(name){return primitiveTypes.includes(name)}function is(value){if(value===null){return"null"}switch(typeof value){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(is.array(value)){return"Array"}if(is.plainFunction(value)){return"Function"}var tagType=getObjectType(value);if(tagType){return tagType}return"Object"}is.array=Array.isArray;is.arrayOf=function(target,predicate){if(!is.array(target)&&!is.function(predicate)){return false}return target.every((function(d){return predicate(d)}))};is.asyncGeneratorFunction=function(value){return getObjectType(value)==="AsyncGeneratorFunction"};is.asyncFunction=isObjectOfType("AsyncFunction");is.bigint=isOfType$1("bigint");is.boolean=function(value){return value===true||value===false};is.date=isObjectOfType("Date");is.defined=function(value){return!is.undefined(value)};is.domElement=function(value){return is.object(value)&&!is.plainObject(value)&&value.nodeType===1&&is.string(value.nodeName)&&DOM_PROPERTIES_TO_CHECK.every((function(property){return property in value}))};is.empty=function(value){return is.string(value)&&value.length===0||is.array(value)&&value.length===0||is.object(value)&&!is.map(value)&&!is.set(value)&&Object.keys(value).length===0||is.set(value)&&value.size===0||is.map(value)&&value.size===0};is.error=isObjectOfType("Error");is.function=isOfType$1("function");is.generator=function(value){return is.iterable(value)&&is.function(value.next)&&is.function(value.throw)};is.generatorFunction=isObjectOfType("GeneratorFunction");is.instanceOf=function(instance,class_){if(!instance||!class_){return false}return Object.getPrototypeOf(instance)===class_.prototype};is.iterable=function(value){return!is.nullOrUndefined(value)&&is.function(value[Symbol.iterator])};is.map=isObjectOfType("Map");is.nan=function(value){return Number.isNaN(value)};is.null=function(value){return value===null};is.nullOrUndefined=function(value){return is.null(value)||is.undefined(value)};is.number=function(value){return isOfType$1("number")(value)&&!is.nan(value)};is.numericString=function(value){return is.string(value)&&value.length>0&&!Number.isNaN(Number(value))};is.object=function(value){return!is.nullOrUndefined(value)&&(is.function(value)||typeof value==="object")};is.oneOf=function(target,value){if(!is.array(target)){return false}return target.indexOf(value)>-1};is.plainFunction=isObjectOfType("Function");is.plainObject=function(value){if(getObjectType(value)!=="Object"){return false}var prototype=Object.getPrototypeOf(value);return prototype===null||prototype===Object.getPrototypeOf({})};is.primitive=function(value){return is.null(value)||isPrimitiveType(typeof value)};is.promise=isObjectOfType("Promise");is.propertyOf=function(target,key,predicate){if(!is.object(target)||!key){return false}var value=target[key];if(is.function(predicate)){return predicate(value)}return is.defined(value)};is.regexp=isObjectOfType("RegExp");is.set=isObjectOfType("Set");is.string=isOfType$1("string");is.symbol=isOfType$1("symbol");is.undefined=isOfType$1("undefined");is.weakMap=isObjectOfType("WeakMap");is.weakSet=isObjectOfType("WeakSet");function isOfType(type){return function(value){return typeof value===type}}var isFunction=isOfType("function");var isNull=function(value){return value===null};var isRegex=function(value){return Object.prototype.toString.call(value).slice(8,-1)==="RegExp"};var isObject=function(value){return!isUndefined(value)&&!isNull(value)&&(isFunction(value)||typeof value==="object")};var isUndefined=isOfType("undefined");var __values=function(o){var s=typeof Symbol==="function"&&Symbol.iterator,m=s&&o[s],i=0;if(m)return m.call(o);if(o&&typeof o.length==="number")return{next:function(){if(o&&i>=o.length)o=void 0;return{value:o&&o[i++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")};function equalArray(left,right){var length=left.length;if(length!==right.length){return false}for(var index=length;index--!==0;){if(!equal(left[index],right[index])){return false}}return true}function equalArrayBuffer(left,right){if(left.byteLength!==right.byteLength){return false}var view1=new DataView(left.buffer);var view2=new DataView(right.buffer);var index=left.byteLength;while(index--){if(view1.getUint8(index)!==view2.getUint8(index)){return false}}return true}function equalMap(left,right){var e_1,_a,e_2,_b;if(left.size!==right.size){return false}try{for(var _c=__values(left.entries()),_d=_c.next();!_d.done;_d=_c.next()){var index=_d.value;if(!right.has(index[0])){return false}}}catch(e_1_1){e_1={error:e_1_1}}finally{try{if(_d&&!_d.done&&(_a=_c.return))_a.call(_c)}finally{if(e_1)throw e_1.error}}try{for(var _e=__values(left.entries()),_f=_e.next();!_f.done;_f=_e.next()){var index=_f.value;if(!equal(index[1],right.get(index[0]))){return false}}}catch(e_2_1){e_2={error:e_2_1}}finally{try{if(_f&&!_f.done&&(_b=_e.return))_b.call(_e)}finally{if(e_2)throw e_2.error}}return true}function equalSet(left,right){var e_3,_a;if(left.size!==right.size){return false}try{for(var _b=__values(left.entries()),_c=_b.next();!_c.done;_c=_b.next()){var index=_c.value;if(!right.has(index[0])){return false}}}catch(e_3_1){e_3={error:e_3_1}}finally{try{if(_c&&!_c.done&&(_a=_b.return))_a.call(_b)}finally{if(e_3)throw e_3.error}}return true}function equal(left,right){if(left===right){return true}if(left&&isObject(left)&&right&&isObject(right)){if(left.constructor!==right.constructor){return false}if(Array.isArray(left)&&Array.isArray(right)){return equalArray(left,right)}if(left instanceof Map&&right instanceof Map){return equalMap(left,right)}if(left instanceof Set&&right instanceof Set){return equalSet(left,right)}if(ArrayBuffer.isView(left)&&ArrayBuffer.isView(right)){return equalArrayBuffer(left,right)}if(isRegex(left)&&isRegex(right)){return left.source===right.source&&left.flags===right.flags}if(left.valueOf!==Object.prototype.valueOf){return left.valueOf()===right.valueOf()}if(left.toString!==Object.prototype.toString){return left.toString()===right.toString()}var leftKeys=Object.keys(left);var rightKeys=Object.keys(right);if(leftKeys.length!==rightKeys.length){return false}for(var index=leftKeys.length;index--!==0;){if(!Object.prototype.hasOwnProperty.call(right,leftKeys[index])){return false}}for(var index=leftKeys.length;index--!==0;){var key=leftKeys[index];if(key==="_owner"&&left.$$typeof){continue}if(!equal(left[key],right[key])){return false}}return true}if(Number.isNaN(left)&&Number.isNaN(right)){return true}return left===right}function canHaveLength(){var arguments_=[];for(var _i=0;_i<arguments.length;_i++){arguments_[_i]=arguments[_i]}return arguments_.every((function(d){return is.string(d)||is.array(d)||is.plainObject(d)}))}function checkEquality(left,right,value){if(!isSameType(left,right)){return false}if([left,right].every(is.array)){return!left.some(hasValue(value))&&right.some(hasValue(value))}if([left,right].every(is.plainObject)){return!Object.entries(left).some(hasEntry(value))&&Object.entries(right).some(hasEntry(value))}return right===value}function compareNumbers(previousData,data,options){var actual=options.actual,key=options.key,previous=options.previous,type=options.type;var left=nested(previousData,key);var right=nested(data,key);var changed=[left,right].every(is.number)&&(type==="increased"?left<right:left>right);if(!is.undefined(actual)){changed=changed&&right===actual}if(!is.undefined(previous)){changed=changed&&left===previous}return changed}function compareValues(previousData,data,options){var key=options.key,type=options.type,value=options.value;var left=nested(previousData,key);var right=nested(data,key);var primary=type==="added"?left:right;var secondary=type==="added"?right:left;if(!is.nullOrUndefined(value)){if(is.defined(primary)){if(is.array(primary)||is.plainObject(primary)){return checkEquality(primary,secondary,value)}}else{return equal(secondary,value)}return false}if([left,right].every(is.array)){return!secondary.every(isEqualPredicate(primary))}if([left,right].every(is.plainObject)){return hasExtraKeys(Object.keys(primary),Object.keys(secondary))}return![left,right].every((function(d){return is.primitive(d)&&is.defined(d)}))&&(type==="added"?!is.defined(left)&&is.defined(right):is.defined(left)&&!is.defined(right))}function getIterables(previousData,data,_a){var _b=_a===void 0?{}:_a,key=_b.key;var left=nested(previousData,key);var right=nested(data,key);if(!isSameType(left,right)){throw new TypeError("Inputs have different types")}if(!canHaveLength(left,right)){throw new TypeError("Inputs don't have length")}if([left,right].every(is.plainObject)){left=Object.keys(left);right=Object.keys(right)}return[left,right]}function hasEntry(input){return function(_a){var key=_a[0],value=_a[1];if(is.array(input)){return equal(input,value)||input.some((function(d){return equal(d,value)||is.array(value)&&isEqualPredicate(value)(d)}))}if(is.plainObject(input)&&input[key]){return!!input[key]&&equal(input[key],value)}return equal(input,value)}}function hasExtraKeys(left,right){return right.some((function(d){return!left.includes(d)}))}function hasValue(input){return function(value){if(is.array(input)){return input.some((function(d){return equal(d,value)||is.array(value)&&isEqualPredicate(value)(d)}))}return equal(input,value)}}function includesOrEqualsTo(previousValue,value){return is.array(previousValue)?previousValue.some((function(d){return equal(d,value)})):equal(previousValue,value)}function isEqualPredicate(data){return function(value){return data.some((function(d){return equal(d,value)}))}}function isSameType(){var arguments_=[];for(var _i=0;_i<arguments.length;_i++){arguments_[_i]=arguments[_i]}return arguments_.every(is.array)||arguments_.every(is.number)||arguments_.every(is.plainObject)||arguments_.every(is.string)}function nested(data,property){if(is.plainObject(data)||is.array(data)){if(is.string(property)){var props=property.split(".");return props.reduce((function(acc,d){return acc&&acc[d]}),data)}if(is.number(property)){return data[property]}return data}return data}function treeChanges(previousData,data){if([previousData,data].some(is.nullOrUndefined)){throw new Error("Missing required parameters")}if(![previousData,data].every((function(d){return is.plainObject(d)||is.array(d)}))){throw new Error("Expected plain objects or array")}var added=function(key,value){try{return compareValues(previousData,data,{key:key,type:"added",value:value})}catch(_a){return false}};var changed=function(key,actual,previous){try{var left=nested(previousData,key);var right=nested(data,key);var hasActual=is.defined(actual);var hasPrevious=is.defined(previous);if(hasActual||hasPrevious){var leftComparator=hasPrevious?includesOrEqualsTo(previous,left):!includesOrEqualsTo(actual,left);var rightComparator=includesOrEqualsTo(actual,right);return leftComparator&&rightComparator}if([left,right].every(is.array)||[left,right].every(is.plainObject)){return!equal(left,right)}return left!==right}catch(_a){return false}};var changedFrom=function(key,previous,actual){if(!is.defined(key)){return false}try{var left=nested(previousData,key);var right=nested(data,key);var hasActual=is.defined(actual);return includesOrEqualsTo(previous,left)&&(hasActual?includesOrEqualsTo(actual,right):!hasActual)}catch(_a){return false}};var changedTo=function(key,actual){if(!is.defined(key)){return false}return changed(key,actual)};var decreased=function(key,actual,previous){if(!is.defined(key)){return false}try{return compareNumbers(previousData,data,{key:key,actual:actual,previous:previous,type:"decreased"})}catch(_a){return false}};var emptied=function(key){try{var _a=getIterables(previousData,data,{key:key}),left=_a[0],right=_a[1];return!!left.length&&!right.length}catch(_b){return false}};var filled=function(key){try{var _a=getIterables(previousData,data,{key:key}),left=_a[0],right=_a[1];return!left.length&&!!right.length}catch(_b){return false}};var increased=function(key,actual,previous){if(!is.defined(key)){return false}try{return compareNumbers(previousData,data,{key:key,actual:actual,previous:previous,type:"increased"})}catch(_a){return false}};var removed=function(key,value){try{return compareValues(previousData,data,{key:key,type:"removed",value:value})}catch(_a){return false}};return{added:added,changed:changed,changedFrom:changedFrom,changedTo:changedTo,decreased:decreased,emptied:emptied,filled:filled,increased:increased,removed:removed}}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r2){return Object.getOwnPropertyDescriptor(e,r2).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread2(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),true).forEach((function(r2){_defineProperty(e,r2,t[r2])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r2){Object.defineProperty(e,r2,Object.getOwnPropertyDescriptor(t,r2))}))}return e}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor}function _defineProperty(obj,key,value){key=_toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass)}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf2(o2){return o2.__proto__||Object.getPrototypeOf(o2)};return _getPrototypeOf(o)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf2(o2,p2){o2.__proto__=p2;return o2};return _setPrototypeOf(o,p)}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return true}catch(e){return false}}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key]}return target}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}}return target}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined")}return _assertThisInitialized(self)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return(hint==="string"?String:Number)(input)}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key)}var DEFAULTS={flip:{padding:20},preventOverflow:{padding:10}};var VALIDATOR_ARG_ERROR_MESSAGE="The typeValidator argument must be a function with the signature function(props, propName, componentName).";var MESSAGE_ARG_ERROR_MESSAGE="The error message is optional, but must be a string if provided.";function propIsRequired(condition,props,propName,componentName){if(typeof condition==="boolean"){return condition}if(typeof condition==="function"){return condition(props,propName,componentName)}if(Boolean(condition)===true){return Boolean(condition)}return false}function propExists(props,propName){return Object.hasOwnProperty.call(props,propName)}function missingPropError(props,propName,componentName,message){return new Error("Required ".concat(props[propName]," `").concat(propName,"` was not specified in `").concat(componentName,"`."))}function guardAgainstInvalidArgTypes(typeValidator,message){if(typeof typeValidator!=="function"){throw new TypeError(VALIDATOR_ARG_ERROR_MESSAGE)}if(Boolean(message)&&typeof message!=="string"){throw new TypeError(MESSAGE_ARG_ERROR_MESSAGE)}}function isRequiredIf(typeValidator,condition,message){guardAgainstInvalidArgTypes(typeValidator,message);return function(props,propName,componentName){for(var _len=arguments.length,rest=new Array(_len>3?_len-3:0),_key=3;_key<_len;_key++){rest[_key-3]=arguments[_key]}if(propIsRequired(condition,props,propName,componentName)){if(propExists(props,propName)){return typeValidator.apply(void 0,[props,propName,componentName].concat(rest))}return missingPropError(props,propName,componentName)}return typeValidator.apply(void 0,[props,propName,componentName].concat(rest))}}var STATUS$1={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing",ERROR:"error"};var isReact16$1=ReactDOM__default.createPortal!==void 0;function canUseDOM$1(){return!!(typeof window!=="undefined"&&window.document&&window.document.createElement)}function isMobile(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function log$1(_ref){var title=_ref.title,data=_ref.data,_ref$warn=_ref.warn,warn=_ref$warn===void 0?false:_ref$warn,_ref$debug=_ref.debug,debug=_ref$debug===void 0?false:_ref$debug;var logFn=warn?console.warn||console.error:console.log;if(debug&&title&&data){console.groupCollapsed("%creact-floater: ".concat(title),"color: #9b00ff; font-weight: bold; font-size: 12px;");if(Array.isArray(data)){data.forEach((function(d){if(is.plainObject(d)&&d.key){logFn.apply(console,[d.key,d.value])}else{logFn.apply(console,[d])}}))}else{logFn.apply(console,[data])}console.groupEnd()}}function on(element,event,cb){var capture=arguments.length>3&&arguments[3]!==void 0?arguments[3]:false;element.addEventListener(event,cb,capture)}function off(element,event,cb){var capture=arguments.length>3&&arguments[3]!==void 0?arguments[3]:false;element.removeEventListener(event,cb,capture)}function once(element,event,cb){var capture=arguments.length>3&&arguments[3]!==void 0?arguments[3]:false;var _nextCB;_nextCB=function nextCB(e){cb(e);off(element,event,_nextCB)};on(element,event,_nextCB,capture)}function noop$1(){}var ReactFloaterPortal=function(_React$Component){_inherits(ReactFloaterPortal2,_React$Component);var _super=_createSuper(ReactFloaterPortal2);function ReactFloaterPortal2(){_classCallCheck(this,ReactFloaterPortal2);return _super.apply(this,arguments)}_createClass(ReactFloaterPortal2,[{key:"componentDidMount",value:function componentDidMount(){if(!canUseDOM$1())return;if(!this.node){this.appendNode()}if(!isReact16$1){this.renderPortal()}}},{key:"componentDidUpdate",value:function componentDidUpdate(){if(!canUseDOM$1())return;if(!isReact16$1){this.renderPortal()}}},{key:"componentWillUnmount",value:function componentWillUnmount(){if(!canUseDOM$1()||!this.node)return;if(!isReact16$1){ReactDOM__default.unmountComponentAtNode(this.node)}if(this.node&&this.node.parentNode===document.body){document.body.removeChild(this.node);this.node=void 0}}},{key:"appendNode",value:function appendNode(){var _this$props=this.props,id=_this$props.id,zIndex=_this$props.zIndex;if(!this.node){this.node=document.createElement("div");if(id){this.node.id=id}if(zIndex){this.node.style.zIndex=zIndex}document.body.appendChild(this.node)}}},{key:"renderPortal",value:function renderPortal(){if(!canUseDOM$1())return null;var _this$props2=this.props,children=_this$props2.children,setRef=_this$props2.setRef;if(!this.node){this.appendNode()}if(isReact16$1){return ReactDOM__default.createPortal(children,this.node)}var portal=ReactDOM__default.unstable_renderSubtreeIntoContainer(this,children.length>1?React__default.createElement("div",null,children):children[0],this.node);setRef(portal);return null}},{key:"renderReact16",value:function renderReact16(){var _this$props3=this.props,hasChildren=_this$props3.hasChildren,placement=_this$props3.placement,target=_this$props3.target;if(!hasChildren){if(target||placement==="center"){return this.renderPortal()}return null}return this.renderPortal()}},{key:"render",value:function render(){if(!isReact16$1){return null}return this.renderReact16()}}]);return ReactFloaterPortal2}(React__default.Component);_defineProperty(ReactFloaterPortal,"propTypes",{children:PropTypes.oneOfType([PropTypes.element,PropTypes.array]),hasChildren:PropTypes.bool,id:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),placement:PropTypes.string,setRef:PropTypes.func.isRequired,target:PropTypes.oneOfType([PropTypes.object,PropTypes.string]),zIndex:PropTypes.number});var FloaterArrow=function(_React$Component){_inherits(FloaterArrow2,_React$Component);var _super=_createSuper(FloaterArrow2);function FloaterArrow2(){_classCallCheck(this,FloaterArrow2);return _super.apply(this,arguments)}_createClass(FloaterArrow2,[{key:"parentStyle",get:function get(){var _this$props=this.props,placement=_this$props.placement,styles2=_this$props.styles;var length=styles2.arrow.length;var arrow2={pointerEvents:"none",position:"absolute",width:"100%"};if(placement.startsWith("top")){arrow2.bottom=0;arrow2.left=0;arrow2.right=0;arrow2.height=length}else if(placement.startsWith("bottom")){arrow2.left=0;arrow2.right=0;arrow2.top=0;arrow2.height=length}else if(placement.startsWith("left")){arrow2.right=0;arrow2.top=0;arrow2.bottom=0}else if(placement.startsWith("right")){arrow2.left=0;arrow2.top=0}return arrow2}},{key:"render",value:function render(){var _this$props2=this.props,placement=_this$props2.placement,setArrowRef=_this$props2.setArrowRef,styles2=_this$props2.styles;var _styles$arrow=styles2.arrow,color=_styles$arrow.color,display=_styles$arrow.display,length=_styles$arrow.length,margin=_styles$arrow.margin,position=_styles$arrow.position,spread=_styles$arrow.spread;var arrowStyles={display:display,position:position};var points;var x=spread;var y=length;if(placement.startsWith("top")){points="0,0 ".concat(x/2,",").concat(y," ").concat(x,",0");arrowStyles.bottom=0;arrowStyles.marginLeft=margin;arrowStyles.marginRight=margin}else if(placement.startsWith("bottom")){points="".concat(x,",").concat(y," ").concat(x/2,",0 0,").concat(y);arrowStyles.top=0;arrowStyles.marginLeft=margin;arrowStyles.marginRight=margin}else if(placement.startsWith("left")){y=spread;x=length;points="0,0 ".concat(x,",").concat(y/2," 0,").concat(y);arrowStyles.right=0;arrowStyles.marginTop=margin;arrowStyles.marginBottom=margin}else if(placement.startsWith("right")){y=spread;x=length;points="".concat(x,",").concat(y," ").concat(x,",0 0,").concat(y/2);arrowStyles.left=0;arrowStyles.marginTop=margin;arrowStyles.marginBottom=margin}return React__default.createElement("div",{className:"__floater__arrow",style:this.parentStyle},React__default.createElement("span",{ref:setArrowRef,style:arrowStyles},React__default.createElement("svg",{width:x,height:y,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},React__default.createElement("polygon",{points:points,fill:color}))))}}]);return FloaterArrow2}(React__default.Component);_defineProperty(FloaterArrow,"propTypes",{placement:PropTypes.string.isRequired,setArrowRef:PropTypes.func.isRequired,styles:PropTypes.object.isRequired});var _excluded$1=["color","height","width"];function FloaterCloseBtn(_ref){var handleClick=_ref.handleClick,styles2=_ref.styles;var color=styles2.color,height=styles2.height,width=styles2.width,style=_objectWithoutProperties(styles2,_excluded$1);return React__default.createElement("button",{"aria-label":"close",onClick:handleClick,style:style,type:"button"},React__default.createElement("svg",{width:"".concat(width,"px"),height:"".concat(height,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},React__default.createElement("g",null,React__default.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:color}))))}FloaterCloseBtn.propTypes={handleClick:PropTypes.func.isRequired,styles:PropTypes.object.isRequired};function FloaterContainer(_ref){var content=_ref.content,footer=_ref.footer,handleClick=_ref.handleClick,open=_ref.open,positionWrapper=_ref.positionWrapper,showCloseButton=_ref.showCloseButton,title=_ref.title,styles2=_ref.styles;var output={content:React__default.isValidElement(content)?content:React__default.createElement("div",{className:"__floater__content",style:styles2.content},content)};if(title){output.title=React__default.isValidElement(title)?title:React__default.createElement("div",{className:"__floater__title",style:styles2.title},title)}if(footer){output.footer=React__default.isValidElement(footer)?footer:React__default.createElement("div",{className:"__floater__footer",style:styles2.footer},footer)}if((showCloseButton||positionWrapper)&&!is["boolean"](open)){output.close=React__default.createElement(FloaterCloseBtn,{styles:styles2.close,handleClick:handleClick})}return React__default.createElement("div",{className:"__floater__container",style:styles2.container},output.close,output.title,output.content,output.footer)}FloaterContainer.propTypes={content:PropTypes.node.isRequired,footer:PropTypes.node,handleClick:PropTypes.func.isRequired,open:PropTypes.bool,positionWrapper:PropTypes.bool.isRequired,showCloseButton:PropTypes.bool.isRequired,styles:PropTypes.object.isRequired,title:PropTypes.node};var Floater=function(_React$Component){_inherits(Floater2,_React$Component);var _super=_createSuper(Floater2);function Floater2(){_classCallCheck(this,Floater2);return _super.apply(this,arguments)}_createClass(Floater2,[{key:"style",get:function get(){var _this$props=this.props,disableAnimation=_this$props.disableAnimation,component=_this$props.component,placement=_this$props.placement,hideArrow=_this$props.hideArrow,status=_this$props.status,styles2=_this$props.styles;var length=styles2.arrow.length,floater=styles2.floater,floaterCentered=styles2.floaterCentered,floaterClosing=styles2.floaterClosing,floaterOpening=styles2.floaterOpening,floaterWithAnimation=styles2.floaterWithAnimation,floaterWithComponent=styles2.floaterWithComponent;var element={};if(!hideArrow){if(placement.startsWith("top")){element.padding="0 0 ".concat(length,"px")}else if(placement.startsWith("bottom")){element.padding="".concat(length,"px 0 0")}else if(placement.startsWith("left")){element.padding="0 ".concat(length,"px 0 0")}else if(placement.startsWith("right")){element.padding="0 0 0 ".concat(length,"px")}}if([STATUS$1.OPENING,STATUS$1.OPEN].indexOf(status)!==-1){element=_objectSpread2(_objectSpread2({},element),floaterOpening)}if(status===STATUS$1.CLOSING){element=_objectSpread2(_objectSpread2({},element),floaterClosing)}if(status===STATUS$1.OPEN&&!disableAnimation){element=_objectSpread2(_objectSpread2({},element),floaterWithAnimation)}if(placement==="center"){element=_objectSpread2(_objectSpread2({},element),floaterCentered)}if(component){element=_objectSpread2(_objectSpread2({},element),floaterWithComponent)}return _objectSpread2(_objectSpread2({},floater),element)}},{key:"render",value:function render(){var _this$props2=this.props,component=_this$props2.component,closeFn=_this$props2.handleClick,hideArrow=_this$props2.hideArrow,setFloaterRef=_this$props2.setFloaterRef,status=_this$props2.status;var output={};var classes=["__floater"];if(component){if(React__default.isValidElement(component)){output.content=React__default.cloneElement(component,{closeFn:closeFn})}else{output.content=component({closeFn:closeFn})}}else{output.content=React__default.createElement(FloaterContainer,this.props)}if(status===STATUS$1.OPEN){classes.push("__floater__open")}if(!hideArrow){output.arrow=React__default.createElement(FloaterArrow,this.props)}return React__default.createElement("div",{ref:setFloaterRef,className:classes.join(" "),style:this.style},React__default.createElement("div",{className:"__floater__body"},output.content,output.arrow))}}]);return Floater2}(React__default.Component);_defineProperty(Floater,"propTypes",{component:PropTypes.oneOfType([PropTypes.func,PropTypes.element]),content:PropTypes.node,disableAnimation:PropTypes.bool.isRequired,footer:PropTypes.node,handleClick:PropTypes.func.isRequired,hideArrow:PropTypes.bool.isRequired,open:PropTypes.bool,placement:PropTypes.string.isRequired,positionWrapper:PropTypes.bool.isRequired,setArrowRef:PropTypes.func.isRequired,setFloaterRef:PropTypes.func.isRequired,showCloseButton:PropTypes.bool,status:PropTypes.string.isRequired,styles:PropTypes.object.isRequired,title:PropTypes.node});var ReactFloaterWrapper=function(_React$Component){_inherits(ReactFloaterWrapper2,_React$Component);var _super=_createSuper(ReactFloaterWrapper2);function ReactFloaterWrapper2(){_classCallCheck(this,ReactFloaterWrapper2);return _super.apply(this,arguments)}_createClass(ReactFloaterWrapper2,[{key:"render",value:function render(){var _this$props=this.props,children=_this$props.children,handleClick=_this$props.handleClick,handleMouseEnter=_this$props.handleMouseEnter,handleMouseLeave=_this$props.handleMouseLeave,setChildRef=_this$props.setChildRef,setWrapperRef=_this$props.setWrapperRef,style=_this$props.style,styles2=_this$props.styles;var element;if(children){if(React__default.Children.count(children)===1){if(!React__default.isValidElement(children)){element=React__default.createElement("span",null,children)}else{var refProp=is["function"](children.type)?"innerRef":"ref";element=React__default.cloneElement(React__default.Children.only(children),_defineProperty({},refProp,setChildRef))}}else{element=children}}if(!element){return null}return React__default.createElement("span",{ref:setWrapperRef,style:_objectSpread2(_objectSpread2({},styles2),style),onClick:handleClick,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave},element)}}]);return ReactFloaterWrapper2}(React__default.Component);_defineProperty(ReactFloaterWrapper,"propTypes",{children:PropTypes.node,handleClick:PropTypes.func.isRequired,handleMouseEnter:PropTypes.func.isRequired,handleMouseLeave:PropTypes.func.isRequired,setChildRef:PropTypes.func.isRequired,setWrapperRef:PropTypes.func.isRequired,style:PropTypes.object,styles:PropTypes.object.isRequired});var defaultOptions$1={zIndex:100};function getStyles$1(styles2){var options=deepmerge2(defaultOptions$1,styles2.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:options.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:options.zIndex},floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:options}}var _excluded=["arrow","flip","offset"];var POSITIONING_PROPS=["position","top","right","bottom","left"];var ReactFloater=function(_React$Component){_inherits(ReactFloater2,_React$Component);var _super=_createSuper(ReactFloater2);function ReactFloater2(props){var _this;_classCallCheck(this,ReactFloater2);_this=_super.call(this,props);_defineProperty(_assertThisInitialized(_this),"setArrowRef",(function(ref){_this.arrowRef=ref}));_defineProperty(_assertThisInitialized(_this),"setChildRef",(function(ref){_this.childRef=ref}));_defineProperty(_assertThisInitialized(_this),"setFloaterRef",(function(ref){_this.floaterRef=ref}));_defineProperty(_assertThisInitialized(_this),"setWrapperRef",(function(ref){_this.wrapperRef=ref}));_defineProperty(_assertThisInitialized(_this),"handleTransitionEnd",(function(){var status=_this.state.status;var callback=_this.props.callback;if(_this.wrapperPopper){_this.wrapperPopper.instance.update()}_this.setState({status:status===STATUS$1.OPENING?STATUS$1.OPEN:STATUS$1.IDLE},(function(){var newStatus=_this.state.status;callback(newStatus===STATUS$1.OPEN?"open":"close",_this.props)}))}));_defineProperty(_assertThisInitialized(_this),"handleClick",(function(){var _this$props=_this.props,event=_this$props.event,open=_this$props.open;if(is["boolean"](open))return;var _this$state=_this.state,positionWrapper=_this$state.positionWrapper,status=_this$state.status;if(_this.event==="click"||_this.event==="hover"&&positionWrapper){log$1({title:"click",data:[{event:event,status:status===STATUS$1.OPEN?"closing":"opening"}],debug:_this.debug});_this.toggle()}}));_defineProperty(_assertThisInitialized(_this),"handleMouseEnter",(function(){var _this$props2=_this.props,event=_this$props2.event,open=_this$props2.open;if(is["boolean"](open)||isMobile())return;var status=_this.state.status;if(_this.event==="hover"&&status===STATUS$1.IDLE){log$1({title:"mouseEnter",data:[{key:"originalEvent",value:event}],debug:_this.debug});clearTimeout(_this.eventDelayTimeout);_this.toggle()}}));_defineProperty(_assertThisInitialized(_this),"handleMouseLeave",(function(){var _this$props3=_this.props,event=_this$props3.event,eventDelay=_this$props3.eventDelay,open=_this$props3.open;if(is["boolean"](open)||isMobile())return;var _this$state2=_this.state,status=_this$state2.status,positionWrapper=_this$state2.positionWrapper;if(_this.event==="hover"){log$1({title:"mouseLeave",data:[{key:"originalEvent",value:event}],debug:_this.debug});if(!eventDelay){_this.toggle(STATUS$1.IDLE)}else if([STATUS$1.OPENING,STATUS$1.OPEN].indexOf(status)!==-1&&!positionWrapper&&!_this.eventDelayTimeout){_this.eventDelayTimeout=setTimeout((function(){delete _this.eventDelayTimeout;_this.toggle()}),eventDelay*1e3)}}}));_this.state={currentPlacement:props.placement,needsUpdate:false,positionWrapper:props.wrapperOptions.position&&!!props.target,status:STATUS$1.INIT,statusWrapper:STATUS$1.INIT};_this._isMounted=false;_this.hasMounted=false;if(canUseDOM$1()){window.addEventListener("load",(function(){if(_this.popper){_this.popper.instance.update()}if(_this.wrapperPopper){_this.wrapperPopper.instance.update()}}))}return _this}_createClass(ReactFloater2,[{key:"componentDidMount",value:function componentDidMount(){if(!canUseDOM$1())return;var positionWrapper=this.state.positionWrapper;var _this$props5=this.props,children=_this$props5.children,open=_this$props5.open,target=_this$props5.target;this._isMounted=true;log$1({title:"init",data:{hasChildren:!!children,hasTarget:!!target,isControlled:is["boolean"](open),positionWrapper:positionWrapper,target:this.target,floater:this.floaterRef},debug:this.debug});if(!this.hasMounted){this.initPopper();this.hasMounted=true}if(!children&&target&&!is["boolean"](open));}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps,prevState){if(!canUseDOM$1())return;var _this$props6=this.props,autoOpen=_this$props6.autoOpen,open=_this$props6.open,target=_this$props6.target,wrapperOptions=_this$props6.wrapperOptions;var _treeChanges=treeChanges(prevState,this.state),changedFrom=_treeChanges.changedFrom,changed=_treeChanges.changed;if(prevProps.open!==open){var forceStatus;if(is["boolean"](open)){forceStatus=open?STATUS$1.OPENING:STATUS$1.CLOSING}this.toggle(forceStatus)}if(prevProps.wrapperOptions.position!==wrapperOptions.position||prevProps.target!==target){this.changeWrapperPosition(this.props)}if(changed("status",STATUS$1.IDLE)&&open){this.toggle(STATUS$1.OPEN)}else if(changedFrom("status",STATUS$1.INIT,STATUS$1.IDLE)&&autoOpen){this.toggle(STATUS$1.OPEN)}if(this.popper&&changed("status",STATUS$1.OPENING)){this.popper.instance.update()}if(this.floaterRef&&(changed("status",STATUS$1.OPENING)||changed("status",STATUS$1.CLOSING))){once(this.floaterRef,"transitionend",this.handleTransitionEnd)}if(changed("needsUpdate",true)){this.rebuildPopper()}}},{key:"componentWillUnmount",value:function componentWillUnmount(){if(!canUseDOM$1())return;this._isMounted=false;if(this.popper){this.popper.instance.destroy()}if(this.wrapperPopper){this.wrapperPopper.instance.destroy()}}},{key:"initPopper",value:function initPopper(){var _this2=this;var target=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.target;var positionWrapper=this.state.positionWrapper;var _this$props7=this.props,disableFlip=_this$props7.disableFlip,getPopper=_this$props7.getPopper,hideArrow=_this$props7.hideArrow,offset2=_this$props7.offset,placement=_this$props7.placement,wrapperOptions=_this$props7.wrapperOptions;var flipBehavior=placement==="top"||placement==="bottom"?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if(placement==="center"){this.setState({status:STATUS$1.IDLE})}else if(target&&this.floaterRef){var _this$options=this.options,arrow2=_this$options.arrow,flip2=_this$options.flip,offsetOptions=_this$options.offset,rest=_objectWithoutProperties(_this$options,_excluded);new Popper(target,this.floaterRef,{placement:placement,modifiers:_objectSpread2({arrow:_objectSpread2({enabled:!hideArrow,element:this.arrowRef},arrow2),flip:_objectSpread2({enabled:!disableFlip,behavior:flipBehavior},flip2),offset:_objectSpread2({offset:"0, ".concat(offset2,"px")},offsetOptions)},rest),onCreate:function onCreate2(data){var _this2$floaterRef;_this2.popper=data;if(!((_this2$floaterRef=_this2.floaterRef)!==null&&_this2$floaterRef!==void 0&&_this2$floaterRef.isConnected)){_this2.setState({needsUpdate:true});return}getPopper(data,"floater");if(_this2._isMounted){_this2.setState({currentPlacement:data.placement,status:STATUS$1.IDLE})}if(placement!==data.placement){setTimeout((function(){data.instance.update()}),1)}},onUpdate:function onUpdate2(data){_this2.popper=data;var currentPlacement=_this2.state.currentPlacement;if(_this2._isMounted&&data.placement!==currentPlacement){_this2.setState({currentPlacement:data.placement})}}})}if(positionWrapper){var wrapperOffset=!is.undefined(wrapperOptions.offset)?wrapperOptions.offset:0;new Popper(this.target,this.wrapperRef,{placement:wrapperOptions.placement||placement,modifiers:{arrow:{enabled:false},offset:{offset:"0, ".concat(wrapperOffset,"px")},flip:{enabled:false}},onCreate:function onCreate2(data){_this2.wrapperPopper=data;if(_this2._isMounted){_this2.setState({statusWrapper:STATUS$1.IDLE})}getPopper(data,"wrapper");if(placement!==data.placement){setTimeout((function(){data.instance.update()}),1)}}})}}},{key:"rebuildPopper",value:function rebuildPopper(){var _this3=this;this.floaterRefInterval=setInterval((function(){var _this3$floaterRef;if((_this3$floaterRef=_this3.floaterRef)!==null&&_this3$floaterRef!==void 0&&_this3$floaterRef.isConnected){clearInterval(_this3.floaterRefInterval);_this3.setState({needsUpdate:false});_this3.initPopper()}}),50)}},{key:"changeWrapperPosition",value:function changeWrapperPosition(_ref){var target=_ref.target,wrapperOptions=_ref.wrapperOptions;this.setState({positionWrapper:wrapperOptions.position&&!!target})}},{key:"toggle",value:function toggle(forceStatus){var status=this.state.status;var nextStatus=status===STATUS$1.OPEN?STATUS$1.CLOSING:STATUS$1.OPENING;if(!is.undefined(forceStatus)){nextStatus=forceStatus}this.setState({status:nextStatus})}},{key:"debug",get:function get(){var debug=this.props.debug;return debug||canUseDOM$1()&&"ReactFloaterDebug"in window&&!!window.ReactFloaterDebug}},{key:"event",get:function get(){var _this$props8=this.props,disableHoverToClick=_this$props8.disableHoverToClick,event=_this$props8.event;if(event==="hover"&&isMobile()&&!disableHoverToClick){return"click"}return event}},{key:"options",get:function get(){var options=this.props.options;return deepmerge2(DEFAULTS,options||{})}},{key:"styles",get:function get(){var _this4=this;var _this$state3=this.state,status=_this$state3.status,positionWrapper=_this$state3.positionWrapper,statusWrapper=_this$state3.statusWrapper;var styles2=this.props.styles;var nextStyles=deepmerge2(getStyles$1(styles2),styles2);if(positionWrapper){var wrapperStyles;if(!([STATUS$1.IDLE].indexOf(status)!==-1)||!([STATUS$1.IDLE].indexOf(statusWrapper)!==-1)){wrapperStyles=nextStyles.wrapperPosition}else{wrapperStyles=this.wrapperPopper.styles}nextStyles.wrapper=_objectSpread2(_objectSpread2({},nextStyles.wrapper),wrapperStyles)}if(this.target){var targetStyles=window.getComputedStyle(this.target);if(this.wrapperStyles){nextStyles.wrapper=_objectSpread2(_objectSpread2({},nextStyles.wrapper),this.wrapperStyles)}else if(!(["relative","static"].indexOf(targetStyles.position)!==-1)){this.wrapperStyles={};if(!positionWrapper){POSITIONING_PROPS.forEach((function(d){_this4.wrapperStyles[d]=targetStyles[d]}));nextStyles.wrapper=_objectSpread2(_objectSpread2({},nextStyles.wrapper),this.wrapperStyles);this.target.style.position="relative";this.target.style.top="auto";this.target.style.right="auto";this.target.style.bottom="auto";this.target.style.left="auto"}}}return nextStyles}},{key:"target",get:function get(){if(!canUseDOM$1())return null;var target=this.props.target;if(target){if(is.domElement(target)){return target}return document.querySelector(target)}return this.childRef||this.wrapperRef}},{key:"render",value:function render(){var _this$state4=this.state,currentPlacement=_this$state4.currentPlacement,positionWrapper=_this$state4.positionWrapper,status=_this$state4.status;var _this$props9=this.props,children=_this$props9.children,component=_this$props9.component,content=_this$props9.content,disableAnimation=_this$props9.disableAnimation,footer=_this$props9.footer,hideArrow=_this$props9.hideArrow,id=_this$props9.id,open=_this$props9.open,showCloseButton=_this$props9.showCloseButton,style=_this$props9.style,target=_this$props9.target,title=_this$props9.title;var wrapper=React__default.createElement(ReactFloaterWrapper,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:style,styles:this.styles.wrapper},children);var output={};if(positionWrapper){output.wrapperInPortal=wrapper}else{output.wrapperAsChildren=wrapper}return React__default.createElement("span",null,React__default.createElement(ReactFloaterPortal,{hasChildren:!!children,id:id,placement:currentPlacement,setRef:this.setFloaterRef,target:target,zIndex:this.styles.options.zIndex},React__default.createElement(Floater,{component:component,content:content,disableAnimation:disableAnimation,footer:footer,handleClick:this.handleClick,hideArrow:hideArrow||currentPlacement==="center",open:open,placement:currentPlacement,positionWrapper:positionWrapper,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:showCloseButton,status:status,styles:this.styles,title:title}),output.wrapperInPortal),output.wrapperAsChildren)}}]);return ReactFloater2}(React__default.Component);_defineProperty(ReactFloater,"propTypes",{autoOpen:PropTypes.bool,callback:PropTypes.func,children:PropTypes.node,component:isRequiredIf(PropTypes.oneOfType([PropTypes.func,PropTypes.element]),(function(props){return!props.content})),content:isRequiredIf(PropTypes.node,(function(props){return!props.component})),debug:PropTypes.bool,disableAnimation:PropTypes.bool,disableFlip:PropTypes.bool,disableHoverToClick:PropTypes.bool,event:PropTypes.oneOf(["hover","click"]),eventDelay:PropTypes.number,footer:PropTypes.node,getPopper:PropTypes.func,hideArrow:PropTypes.bool,id:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),offset:PropTypes.number,open:PropTypes.bool,options:PropTypes.object,placement:PropTypes.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:PropTypes.bool,style:PropTypes.object,styles:PropTypes.object,target:PropTypes.oneOfType([PropTypes.object,PropTypes.string]),title:PropTypes.node,wrapperOptions:PropTypes.shape({offset:PropTypes.number,placement:PropTypes.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:PropTypes.bool})});_defineProperty(ReactFloater,"defaultProps",{autoOpen:false,callback:noop$1,debug:false,disableAnimation:false,disableFlip:false,disableHoverToClick:false,event:"click",eventDelay:.4,getPopper:noop$1,hideArrow:false,offset:15,placement:"bottom",showCloseButton:false,styles:{},target:null,wrapperOptions:{position:false}});var hasProps=function(jsx2){return Object.prototype.hasOwnProperty.call(jsx2,"props")};var reduceJsxToString=function(previous,current){return previous+innerText(current)};var innerText=function(jsx2){if(jsx2===null||typeof jsx2==="boolean"||typeof jsx2==="undefined"){return""}if(typeof jsx2==="number"){return jsx2.toString()}if(typeof jsx2==="string"){return jsx2}if(Array.isArray(jsx2)){return jsx2.reduce(reduceJsxToString,"")}if(hasProps(jsx2)&&Object.prototype.hasOwnProperty.call(jsx2.props,"children")){return innerText(jsx2.props.children)}return""};innerText.default=innerText;var reactInnertext=innerText;const innerText$1=getDefaultExportFromCjs(reactInnertext);var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:true,configurable:true,writable:true,value:value}):obj[key]=value;var __publicField=(obj,key,value)=>{__defNormalProp(obj,typeof key!=="symbol"?key+"":key,value);return value};var ACTIONS={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update"};var EVENTS={TOUR_START:"tour:start",STEP_BEFORE:"step:before",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found",ERROR:"error"};var LIFECYCLE={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"};var STATUS={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished",ERROR:"error"};function canUseDOM(){return!!(typeof window!=="undefined"&&window.document&&window.document.createElement)}function getClientRect(element){if(!element){return null}return element.getBoundingClientRect()}function getDocumentHeight(median2=true){const{body:body,documentElement:documentElement}=document;if(!body||!documentElement){return 0}if(median2){const heights=[body.scrollHeight,body.offsetHeight,documentElement.clientHeight,documentElement.scrollHeight,documentElement.offsetHeight].sort(((a,b)=>a-b));const middle=Math.floor(heights.length/2);if(heights.length%2===0){return(heights[middle-1]+heights[middle])/2}return heights[middle]}return Math.max(body.scrollHeight,body.offsetHeight,documentElement.clientHeight,documentElement.scrollHeight,documentElement.offsetHeight)}function getElement(element){if(typeof element==="string"){return document.querySelector(element)}return element}function getStyleComputedProperty(el){if(!el||el.nodeType!==1){return null}return getComputedStyle(el)}function getScrollParent(element,skipFix,forListener){if(!element){return scrollDocument()}const parent=scrollParent(element);if(parent){if(parent.isSameNode(scrollDocument())){if(forListener){return document}return scrollDocument()}const hasScrolling=parent.scrollHeight>parent.offsetHeight;if(!hasScrolling&&!skipFix){parent.style.overflow="initial";return scrollDocument()}}return parent}function hasCustomScrollParent(element,skipFix){if(!element){return false}const parent=getScrollParent(element,skipFix);return parent?!parent.isSameNode(scrollDocument()):false}function hasCustomOffsetParent(element){return element.offsetParent!==document.body}function hasPosition(el,type="fixed"){if(!el||!(el instanceof HTMLElement)){return false}const{nodeName:nodeName}=el;const styles2=getStyleComputedProperty(el);if(nodeName==="BODY"||nodeName==="HTML"){return false}if(styles2&&styles2.position===type){return true}if(!el.parentNode){return false}return hasPosition(el.parentNode,type)}function isElementVisible(element){var _a;if(!element){return false}let parentElement=element;while(parentElement){if(parentElement===document.body){break}if(parentElement instanceof HTMLElement){const{display:display,visibility:visibility}=getComputedStyle(parentElement);if(display==="none"||visibility==="hidden"){return false}}parentElement=(_a=parentElement.parentElement)!=null?_a:null}return true}function getElementPosition(element,offset2,skipFix){var _a;const elementRect=getClientRect(element);const parent=getScrollParent(element,skipFix);const hasScrollParent=hasCustomScrollParent(element,skipFix);let parentTop=0;let top=(_a=elementRect==null?void 0:elementRect.top)!=null?_a:0;if(parent instanceof HTMLElement){parentTop=parent.scrollTop;if(!hasScrollParent&&!hasPosition(element)){top+=parentTop}if(!parent.isSameNode(scrollDocument())){top+=scrollDocument().scrollTop}}return Math.floor(top-offset2)}function getScrollTo(element,offset2,skipFix){var _a;if(!element){return 0}const{offsetTop:offsetTop=0,scrollTop:scrollTop=0}=(_a=scrollParent(element))!=null?_a:{};let top=element.getBoundingClientRect().top+scrollTop;if(!!offsetTop&&(hasCustomScrollParent(element,skipFix)||hasCustomOffsetParent(element))){top-=offsetTop}const output=Math.floor(top-offset2);return output<0?0:output}function scrollDocument(){var _a;return(_a=document.scrollingElement)!=null?_a:document.documentElement}function scrollTo(value,options){const{duration:duration,element:element}=options;return new Promise(((resolve,reject)=>{const{scrollTop:scrollTop}=element;const limit=value>scrollTop?value-scrollTop:scrollTop-value;scroll$1.top(element,value,{duration:limit<100?50:duration},(error=>{if(error&&error.message!=="Element already at target scroll position"){return reject(error)}return resolve()}))}))}var isReact16=createPortal!==void 0;function getBrowser(userAgent=navigator.userAgent){let browser=userAgent;if(typeof window==="undefined"){browser="node"}else if(document.documentMode){browser="ie"}else if(/Edge/.test(userAgent)){browser="edge"}else if(Boolean(window.opera)||userAgent.includes(" OPR/")){browser="opera"}else if(typeof window.InstallTrigger!=="undefined"){browser="firefox"}else if(window.chrome){browser="chrome"}else if(/(Version\/([\d._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(userAgent)){browser="safari"}return browser}function getText(root){const content=[];const recurse=child=>{if(typeof child==="string"||typeof child==="number"){content.push(child)}else if(Array.isArray(child)){child.forEach((c=>recurse(c)))}else if(isValidElement(child)){const{children:children}=child.props;if(Array.isArray(children)){children.forEach((c=>recurse(c)))}else{recurse(children)}}};recurse(root);return content.join(" ").trim()}function hasValidKeys(object,keys){if(!src_default$1.plainObject(object)||!src_default$1.array(keys)){return false}return Object.keys(object).every((d=>keys.includes(d)))}function hexToRGB(hex){const shorthandRegex=/^#?([\da-f])([\da-f])([\da-f])$/i;const properHex=hex.replace(shorthandRegex,((_m,r,g,b)=>r+r+g+g+b+b));const result=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(properHex);return result?[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)]:[]}function hideBeacon(step){return step.disableBeacon||step.placement==="center"}function isLegacy(){return!["chrome","safari","firefox","opera"].includes(getBrowser())}function log({data:data,debug:debug=false,title:title,warn:warn=false}){const logFn=warn?console.warn||console.error:console.log;if(debug){if(title&&data){console.groupCollapsed(`%creact-joyride: ${title}`,"color: #ff0044; font-weight: bold; font-size: 12px;");if(Array.isArray(data)){data.forEach((d=>{if(src_default$1.plainObject(d)&&d.key){logFn.apply(console,[d.key,d.value])}else{logFn.apply(console,[d])}}))}else{logFn.apply(console,[data])}console.groupEnd()}else{console.error("Missing title or data props")}}}function noop(){return void 0}function objectKeys(input){return Object.keys(input)}function omit(input,...filter){if(!src_default$1.plainObject(input)){throw new TypeError("Expected an object")}const output={};for(const key in input){if({}.hasOwnProperty.call(input,key)){if(!filter.includes(key)){output[key]=input[key]}}}return output}function pick(input,...filter){if(!src_default$1.plainObject(input)){throw new TypeError("Expected an object")}if(!filter.length){return input}const output={};for(const key in input){if({}.hasOwnProperty.call(input,key)){if(filter.includes(key)){output[key]=input[key]}}}return output}function shouldScroll(options){const{isFirstStep:isFirstStep,lifecycle:lifecycle,previousLifecycle:previousLifecycle,scrollToFirstStep:scrollToFirstStep,step:step,target:target}=options;return!step.disableScrolling&&(!isFirstStep||scrollToFirstStep||lifecycle===LIFECYCLE.TOOLTIP)&&step.placement!=="center"&&(!step.isFixed||!hasPosition(target))&&previousLifecycle!==lifecycle&&[LIFECYCLE.BEACON,LIFECYCLE.TOOLTIP].includes(lifecycle)}var defaultFloaterProps={options:{preventOverflow:{boundariesElement:"scrollParent"}},wrapperOptions:{offset:-18,position:true}};var defaultLocale={back:"Back",close:"Close",last:"Last",next:"Next",open:"Open the dialog",skip:"Skip"};var defaultStep={event:"click",placement:"bottom",offset:10,disableBeacon:false,disableCloseOnEsc:false,disableOverlay:false,disableOverlayClose:false,disableScrollParentFix:false,disableScrolling:false,hideBackButton:false,hideCloseButton:false,hideFooter:false,isFixed:false,locale:defaultLocale,showProgress:false,showSkipButton:false,spotlightClicks:false,spotlightPadding:10};var defaultProps={continuous:false,debug:false,disableCloseOnEsc:false,disableOverlay:false,disableOverlayClose:false,disableScrolling:false,disableScrollParentFix:false,getHelpers:noop(),hideBackButton:false,run:true,scrollOffset:20,scrollDuration:300,scrollToFirstStep:false,showSkipButton:false,showProgress:false,spotlightClicks:false,spotlightPadding:10,steps:[]};var defaultOptions={arrowColor:"#fff",backgroundColor:"#fff",beaconSize:36,overlayColor:"rgba(0, 0, 0, 0.5)",primaryColor:"#f04",spotlightShadow:"0 0 15px rgba(0, 0, 0, 0.5)",textColor:"#333",width:380,zIndex:100};var buttonBase={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",cursor:"pointer",fontSize:16,lineHeight:1,padding:8,WebkitAppearance:"none"};var spotlight={borderRadius:4,position:"absolute"};function getStyles(props,step){var _a,_b,_c,_d,_e;const{floaterProps:floaterProps,styles:styles2}=props;const mergedFloaterProps=deepmerge2((_a=step.floaterProps)!=null?_a:{},floaterProps!=null?floaterProps:{});const mergedStyles=deepmerge2(styles2!=null?styles2:{},(_b=step.styles)!=null?_b:{});const options=deepmerge2(defaultOptions,mergedStyles.options||{});const hideBeacon2=step.placement==="center"||step.disableBeacon;let{width:width}=options;if(window.innerWidth>480){width=380}if("width"in options){width=typeof options.width==="number"&&window.innerWidth<options.width?window.innerWidth-30:options.width}const overlay={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,zIndex:options.zIndex};const defaultStyles={beacon:{...buttonBase,display:hideBeacon2?"none":"inline-block",height:options.beaconSize,position:"relative",width:options.beaconSize,zIndex:options.zIndex},beaconInner:{animation:"joyride-beacon-inner 1.2s infinite ease-in-out",backgroundColor:options.primaryColor,borderRadius:"50%",display:"block",height:"50%",left:"50%",opacity:.7,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"50%"},beaconOuter:{animation:"joyride-beacon-outer 1.2s infinite ease-in-out",backgroundColor:`rgba(${hexToRGB(options.primaryColor).join(",")}, 0.2)`,border:`2px solid ${options.primaryColor}`,borderRadius:"50%",boxSizing:"border-box",display:"block",height:"100%",left:0,opacity:.9,position:"absolute",top:0,transformOrigin:"center",width:"100%"},tooltip:{backgroundColor:options.backgroundColor,borderRadius:5,boxSizing:"border-box",color:options.textColor,fontSize:16,maxWidth:"100%",padding:15,position:"relative",width:width},tooltipContainer:{lineHeight:1.4,textAlign:"center"},tooltipTitle:{fontSize:18,margin:0},tooltipContent:{padding:"20px 10px"},tooltipFooter:{alignItems:"center",display:"flex",justifyContent:"flex-end",marginTop:15},tooltipFooterSpacer:{flex:1},buttonNext:{...buttonBase,backgroundColor:options.primaryColor,borderRadius:4,color:"#fff"},buttonBack:{...buttonBase,color:options.primaryColor,marginLeft:"auto",marginRight:5},buttonClose:{...buttonBase,color:options.textColor,height:14,padding:15,position:"absolute",right:0,top:0,width:14},buttonSkip:{...buttonBase,color:options.textColor,fontSize:14},overlay:{...overlay,backgroundColor:options.overlayColor,mixBlendMode:"hard-light"},overlayLegacy:{...overlay},overlayLegacyCenter:{...overlay,backgroundColor:options.overlayColor},spotlight:{...spotlight,backgroundColor:"gray"},spotlightLegacy:{...spotlight,boxShadow:`0 0 0 9999px ${options.overlayColor}, ${options.spotlightShadow}`},floaterStyles:{arrow:{color:(_e=(_d=(_c=mergedFloaterProps==null?void 0:mergedFloaterProps.styles)==null?void 0:_c.arrow)==null?void 0:_d.color)!=null?_e:options.arrowColor},options:{zIndex:options.zIndex+100}},options:options};return deepmerge2(defaultStyles,mergedStyles)}function getTourProps(props){return pick(props,"beaconComponent","disableCloseOnEsc","disableOverlay","disableOverlayClose","disableScrolling","disableScrollParentFix","floaterProps","hideBackButton","hideCloseButton","locale","showProgress","showSkipButton","spotlightClicks","spotlightPadding","styles","tooltipComponent")}function getMergedStep(props,currentStep){var _a,_b,_c,_d,_e,_f;const step=currentStep!=null?currentStep:{};const mergedStep=deepmerge2.all([defaultStep,getTourProps(props),step],{isMergeableObject:src_default$1.plainObject});const mergedStyles=getStyles(props,mergedStep);const scrollParent2=hasCustomScrollParent(getElement(mergedStep.target),mergedStep.disableScrollParentFix);const floaterProps=deepmerge2.all([defaultFloaterProps,(_a=props.floaterProps)!=null?_a:{},(_b=mergedStep.floaterProps)!=null?_b:{}]);floaterProps.offset=mergedStep.offset;floaterProps.styles=deepmerge2((_c=floaterProps.styles)!=null?_c:{},mergedStyles.floaterStyles);floaterProps.offset+=(_e=(_d=props.spotlightPadding)!=null?_d:mergedStep.spotlightPadding)!=null?_e:0;if(mergedStep.placementBeacon&&floaterProps.wrapperOptions){floaterProps.wrapperOptions.placement=mergedStep.placementBeacon}if(scrollParent2&&floaterProps.options.preventOverflow){floaterProps.options.preventOverflow.boundariesElement="window"}return{...mergedStep,locale:deepmerge2.all([defaultLocale,(_f=props.locale)!=null?_f:{},mergedStep.locale||{}]),floaterProps:floaterProps,styles:omit(mergedStyles,"floaterStyles")}}function validateStep(step,debug=false){if(!src_default$1.plainObject(step)){log({title:"validateStep",data:"step must be an object",warn:true,debug:debug});return false}if(!step.target){log({title:"validateStep",data:"target is missing from the step",warn:true,debug:debug});return false}return true}function validateSteps(steps,debug=false){if(!src_default$1.array(steps)){log({title:"validateSteps",data:"steps must be an array",warn:true,debug:debug});return false}return steps.every((d=>validateStep(d,debug)))}var defaultState={action:"init",controlled:false,index:0,lifecycle:LIFECYCLE.INIT,origin:null,size:0,status:STATUS.IDLE};var validKeys=objectKeys(omit(defaultState,"controlled","size"));var Store=class{constructor(options){__publicField(this,"beaconPopper");__publicField(this,"tooltipPopper");__publicField(this,"data",new Map);__publicField(this,"listener");__publicField(this,"store",new Map);__publicField(this,"addListener",(listener=>{this.listener=listener}));__publicField(this,"setSteps",(steps2=>{const{size:size,status:status}=this.getState();const state={size:steps2.length,status:status};this.data.set("steps",steps2);if(status===STATUS.WAITING&&!size&&steps2.length){state.status=STATUS.RUNNING}this.setState(state)}));__publicField(this,"getPopper",(name=>{if(name==="beacon"){return this.beaconPopper}return this.tooltipPopper}));__publicField(this,"setPopper",((name,popper)=>{if(name==="beacon"){this.beaconPopper=popper}else{this.tooltipPopper=popper}}));__publicField(this,"cleanupPoppers",(()=>{this.beaconPopper=null;this.tooltipPopper=null}));__publicField(this,"close",((origin=null)=>{const{index:index,status:status}=this.getState();if(status!==STATUS.RUNNING){return}this.setState({...this.getNextState({action:ACTIONS.CLOSE,index:index+1,origin:origin})})}));__publicField(this,"go",(nextIndex=>{const{controlled:controlled,status:status}=this.getState();if(controlled||status!==STATUS.RUNNING){return}const step=this.getSteps()[nextIndex];this.setState({...this.getNextState({action:ACTIONS.GO,index:nextIndex}),status:step?status:STATUS.FINISHED})}));__publicField(this,"info",(()=>this.getState()));__publicField(this,"next",(()=>{const{index:index,status:status}=this.getState();if(status!==STATUS.RUNNING){return}this.setState(this.getNextState({action:ACTIONS.NEXT,index:index+1}))}));__publicField(this,"open",(()=>{const{status:status}=this.getState();if(status!==STATUS.RUNNING){return}this.setState({...this.getNextState({action:ACTIONS.UPDATE,lifecycle:LIFECYCLE.TOOLTIP})})}));__publicField(this,"prev",(()=>{const{index:index,status:status}=this.getState();if(status!==STATUS.RUNNING){return}this.setState({...this.getNextState({action:ACTIONS.PREV,index:index-1})})}));__publicField(this,"reset",((restart=false)=>{const{controlled:controlled}=this.getState();if(controlled){return}this.setState({...this.getNextState({action:ACTIONS.RESET,index:0}),status:restart?STATUS.RUNNING:STATUS.READY})}));__publicField(this,"skip",(()=>{const{status:status}=this.getState();if(status!==STATUS.RUNNING){return}this.setState({action:ACTIONS.SKIP,lifecycle:LIFECYCLE.INIT,status:STATUS.SKIPPED})}));__publicField(this,"start",(nextIndex=>{const{index:index,size:size}=this.getState();this.setState({...this.getNextState({action:ACTIONS.START,index:src_default$1.number(nextIndex)?nextIndex:index},true),status:size?STATUS.RUNNING:STATUS.WAITING})}));__publicField(this,"stop",((advance=false)=>{const{index:index,status:status}=this.getState();if([STATUS.FINISHED,STATUS.SKIPPED].includes(status)){return}this.setState({...this.getNextState({action:ACTIONS.STOP,index:index+(advance?1:0)}),status:STATUS.PAUSED})}));__publicField(this,"update",(state=>{var _a,_b;if(!hasValidKeys(state,validKeys)){throw new Error(`State is not valid. Valid keys: ${validKeys.join(", ")}`)}this.setState({...this.getNextState({...this.getState(),...state,action:(_a=state.action)!=null?_a:ACTIONS.UPDATE,origin:(_b=state.origin)!=null?_b:null},true)})}));const{continuous:continuous=false,stepIndex:stepIndex,steps:steps=[]}=options!=null?options:{};this.setState({action:ACTIONS.INIT,controlled:src_default$1.number(stepIndex),continuous:continuous,index:src_default$1.number(stepIndex)?stepIndex:0,lifecycle:LIFECYCLE.INIT,origin:null,status:steps.length?STATUS.READY:STATUS.IDLE},true);this.beaconPopper=null;this.tooltipPopper=null;this.listener=null;this.setSteps(steps)}getState(){if(!this.store.size){return{...defaultState}}return{action:this.store.get("action")||"",controlled:this.store.get("controlled")||false,index:parseInt(this.store.get("index"),10),lifecycle:this.store.get("lifecycle")||"",origin:this.store.get("origin")||null,size:this.store.get("size")||0,status:this.store.get("status")||""}}getNextState(state,force=false){var _a,_b,_c,_d,_e;const{action:action,controlled:controlled,index:index,size:size,status:status}=this.getState();const newIndex=src_default$1.number(state.index)?state.index:index;const nextIndex=controlled&&!force?index:Math.min(Math.max(newIndex,0),size);return{action:(_a=state.action)!=null?_a:action,controlled:controlled,index:nextIndex,lifecycle:(_b=state.lifecycle)!=null?_b:LIFECYCLE.INIT,origin:(_c=state.origin)!=null?_c:null,size:(_d=state.size)!=null?_d:size,status:nextIndex===size?STATUS.FINISHED:(_e=state.status)!=null?_e:status}}getSteps(){const steps=this.data.get("steps");return Array.isArray(steps)?steps:[]}hasUpdatedState(oldState){const before=JSON.stringify(oldState);const after=JSON.stringify(this.getState());return before!==after}setState(nextState,initial=false){const state=this.getState();const{action:action,index:index,lifecycle:lifecycle,origin:origin=null,size:size,status:status}={...state,...nextState};this.store.set("action",action);this.store.set("index",index);this.store.set("lifecycle",lifecycle);this.store.set("origin",origin);this.store.set("size",size);this.store.set("status",status);if(initial){this.store.set("controlled",nextState.controlled);this.store.set("continuous",nextState.continuous)}if(this.listener&&this.hasUpdatedState(state)){this.listener(this.getState())}}getHelpers(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}};function createStore(options){return new Store(options)}function JoyrideSpotlight({styles:styles2}){return React.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight","data-test-id":"spotlight",style:styles2})}var Spotlight_default=JoyrideSpotlight;var JoyrideOverlay=class extends React.Component{constructor(){super(...arguments);__publicField(this,"isActive",false);__publicField(this,"resizeTimeout");__publicField(this,"scrollTimeout");__publicField(this,"scrollParent");__publicField(this,"state",{isScrolling:false,mouseOverSpotlight:false,showSpotlight:true});__publicField(this,"hideSpotlight",(()=>{const{continuous:continuous,disableOverlay:disableOverlay,lifecycle:lifecycle}=this.props;const hiddenLifecycles=[LIFECYCLE.BEACON,LIFECYCLE.COMPLETE,LIFECYCLE.ERROR];return disableOverlay||(continuous?hiddenLifecycles.includes(lifecycle):lifecycle!==LIFECYCLE.TOOLTIP)}));__publicField(this,"handleMouseMove",(event=>{const{mouseOverSpotlight:mouseOverSpotlight}=this.state;const{height:height,left:left,position:position,top:top,width:width}=this.spotlightStyles;const offsetY=position==="fixed"?event.clientY:event.pageY;const offsetX=position==="fixed"?event.clientX:event.pageX;const inSpotlightHeight=offsetY>=top&&offsetY<=top+height;const inSpotlightWidth=offsetX>=left&&offsetX<=left+width;const inSpotlight=inSpotlightWidth&&inSpotlightHeight;if(inSpotlight!==mouseOverSpotlight){this.updateState({mouseOverSpotlight:inSpotlight})}}));__publicField(this,"handleScroll",(()=>{const{target:target}=this.props;const element=getElement(target);if(this.scrollParent!==document){const{isScrolling:isScrolling}=this.state;if(!isScrolling){this.updateState({isScrolling:true,showSpotlight:false})}clearTimeout(this.scrollTimeout);this.scrollTimeout=window.setTimeout((()=>{this.updateState({isScrolling:false,showSpotlight:true})}),50)}else if(hasPosition(element,"sticky")){this.updateState({})}}));__publicField(this,"handleResize",(()=>{clearTimeout(this.resizeTimeout);this.resizeTimeout=window.setTimeout((()=>{if(!this.isActive){return}this.forceUpdate()}),100)}))}componentDidMount(){const{debug:debug,disableScrolling:disableScrolling,disableScrollParentFix:disableScrollParentFix=false,target:target}=this.props;const element=getElement(target);this.scrollParent=getScrollParent(element!=null?element:document.body,disableScrollParentFix,true);this.isActive=true;window.addEventListener("resize",this.handleResize)}componentDidUpdate(previousProps){var _a;const{lifecycle:lifecycle,spotlightClicks:spotlightClicks}=this.props;const{changed:changed}=treeChanges$1(previousProps,this.props);if(changed("lifecycle",LIFECYCLE.TOOLTIP)){(_a=this.scrollParent)==null?void 0:_a.addEventListener("scroll",this.handleScroll,{passive:true});setTimeout((()=>{const{isScrolling:isScrolling}=this.state;if(!isScrolling){this.updateState({showSpotlight:true})}}),100)}if(changed("spotlightClicks")||changed("disableOverlay")||changed("lifecycle")){if(spotlightClicks&&lifecycle===LIFECYCLE.TOOLTIP){window.addEventListener("mousemove",this.handleMouseMove,false)}else if(lifecycle!==LIFECYCLE.TOOLTIP){window.removeEventListener("mousemove",this.handleMouseMove)}}}componentWillUnmount(){var _a;this.isActive=false;window.removeEventListener("mousemove",this.handleMouseMove);window.removeEventListener("resize",this.handleResize);clearTimeout(this.resizeTimeout);clearTimeout(this.scrollTimeout);(_a=this.scrollParent)==null?void 0:_a.removeEventListener("scroll",this.handleScroll)}get overlayStyles(){const{mouseOverSpotlight:mouseOverSpotlight}=this.state;const{disableOverlayClose:disableOverlayClose,placement:placement,styles:styles2}=this.props;let baseStyles=styles2.overlay;if(isLegacy()){baseStyles=placement==="center"?styles2.overlayLegacyCenter:styles2.overlayLegacy}return{cursor:disableOverlayClose?"default":"pointer",height:getDocumentHeight(),pointerEvents:mouseOverSpotlight?"none":"auto",...baseStyles}}get spotlightStyles(){var _a,_b,_c;const{showSpotlight:showSpotlight}=this.state;const{disableScrollParentFix:disableScrollParentFix=false,spotlightClicks:spotlightClicks,spotlightPadding:spotlightPadding=0,styles:styles2,target:target}=this.props;const element=getElement(target);const elementRect=getClientRect(element);const isFixedTarget=hasPosition(element);const top=getElementPosition(element,spotlightPadding,disableScrollParentFix);return{...isLegacy()?styles2.spotlightLegacy:styles2.spotlight,height:Math.round(((_a=elementRect==null?void 0:elementRect.height)!=null?_a:0)+spotlightPadding*2),left:Math.round(((_b=elementRect==null?void 0:elementRect.left)!=null?_b:0)-spotlightPadding),opacity:showSpotlight?1:0,pointerEvents:spotlightClicks?"none":"auto",position:isFixedTarget?"fixed":"absolute",top:top,transition:"opacity 0.2s",width:Math.round(((_c=elementRect==null?void 0:elementRect.width)!=null?_c:0)+spotlightPadding*2)}}updateState(state){if(!this.isActive){return}this.setState((previousState=>({...previousState,...state})))}render(){const{showSpotlight:showSpotlight}=this.state;const{onClickOverlay:onClickOverlay,placement:placement}=this.props;const{hideSpotlight:hideSpotlight,overlayStyles:overlayStyles,spotlightStyles:spotlightStyles}=this;if(hideSpotlight()){return null}let spotlight2=placement!=="center"&&showSpotlight&&React.createElement(Spotlight_default,{styles:spotlightStyles});if(getBrowser()==="safari"){const{mixBlendMode:mixBlendMode,zIndex:zIndex,...safariOverlay}=overlayStyles;spotlight2=React.createElement("div",{style:{...safariOverlay}},spotlight2);delete overlayStyles.backgroundColor}return React.createElement("div",{className:"react-joyride__overlay","data-test-id":"overlay",onClick:onClickOverlay,role:"presentation",style:overlayStyles},spotlight2)}};var JoyridePortal=class extends React.Component{constructor(){super(...arguments);__publicField(this,"node",null)}componentDidMount(){const{id:id}=this.props;if(!canUseDOM()){return}this.node=document.createElement("div");this.node.id=id;document.body.appendChild(this.node);if(!isReact16){this.renderReact15()}}componentDidUpdate(){if(!canUseDOM()){return}if(!isReact16){this.renderReact15()}}componentWillUnmount(){if(!canUseDOM()||!this.node){return}if(!isReact16){ReactDOM.unmountComponentAtNode(this.node)}if(this.node.parentNode===document.body){document.body.removeChild(this.node);this.node=null}}renderReact15(){if(!canUseDOM()){return}const{children:children}=this.props;if(this.node){ReactDOM.unstable_renderSubtreeIntoContainer(this,children,this.node)}}renderReact16(){if(!canUseDOM()||!isReact16){return null}const{children:children}=this.props;if(!this.node){return null}return ReactDOM.createPortal(children,this.node)}render(){if(!isReact16){return null}return this.renderReact16()}};var Scope=class{constructor(element,options){__publicField(this,"element");__publicField(this,"options");__publicField(this,"canBeTabbed",(element2=>{const{tabIndex:tabIndex}=element2;if(tabIndex===null||tabIndex<0){return false}return this.canHaveFocus(element2)}));__publicField(this,"canHaveFocus",(element2=>{const validTabNodes=/input|select|textarea|button|object/;const nodeName=element2.nodeName.toLowerCase();const isValid=validTabNodes.test(nodeName)&&!element2.getAttribute("disabled")||nodeName==="a"&&!!element2.getAttribute("href");return isValid&&this.isVisible(element2)}));__publicField(this,"findValidTabElements",(()=>[].slice.call(this.element.querySelectorAll("*"),0).filter(this.canBeTabbed)));__publicField(this,"handleKeyDown",(event=>{const{code:code="Tab"}=this.options;if(event.code===code){this.interceptTab(event)}}));__publicField(this,"interceptTab",(event=>{event.preventDefault();const elements=this.findValidTabElements();const{shiftKey:shiftKey}=event;if(!elements.length){return}let x=document.activeElement?elements.indexOf(document.activeElement):0;if(x===-1||!shiftKey&&x+1===elements.length){x=0}else if(shiftKey&&x===0){x=elements.length-1}else{x+=shiftKey?-1:1}elements[x].focus()}));__publicField(this,"isHidden",(element2=>{const noSize=element2.offsetWidth<=0&&element2.offsetHeight<=0;const style=window.getComputedStyle(element2);if(noSize&&!element2.innerHTML){return true}return noSize&&style.getPropertyValue("overflow")!=="visible"||style.getPropertyValue("display")==="none"}));__publicField(this,"isVisible",(element2=>{let parentElement=element2;while(parentElement){if(parentElement instanceof HTMLElement){if(parentElement===document.body){break}if(this.isHidden(parentElement)){return false}parentElement=parentElement.parentNode}}return true}));__publicField(this,"removeScope",(()=>{window.removeEventListener("keydown",this.handleKeyDown)}));__publicField(this,"checkFocus",(target=>{if(document.activeElement!==target){target.focus();window.requestAnimationFrame((()=>this.checkFocus(target)))}}));__publicField(this,"setFocus",(()=>{const{selector:selector}=this.options;if(!selector){return}const target=this.element.querySelector(selector);if(target){window.requestAnimationFrame((()=>this.checkFocus(target)))}}));if(!(element instanceof HTMLElement)){throw new TypeError("Invalid parameter: element must be an HTMLElement")}this.element=element;this.options=options;window.addEventListener("keydown",this.handleKeyDown,false);this.setFocus()}};var JoyrideBeacon=class extends React.Component{constructor(props){super(props);__publicField(this,"beacon",null);__publicField(this,"setBeaconRef",(c=>{this.beacon=c}));if(props.beaconComponent){return}const head=document.head||document.getElementsByTagName("head")[0];const style=document.createElement("style");style.id="joyride-beacon-animation";if(props.nonce){style.setAttribute("nonce",props.nonce)}const css=`\n @keyframes joyride-beacon-inner {\n 20% {\n opacity: 0.9;\n }\n \n 90% {\n opacity: 0.7;\n }\n }\n \n @keyframes joyride-beacon-outer {\n 0% {\n transform: scale(1);\n }\n \n 45% {\n opacity: 0.7;\n transform: scale(0.75);\n }\n \n 100% {\n opacity: 0.9;\n transform: scale(1);\n }\n }\n `;style.appendChild(document.createTextNode(css));head.appendChild(style)}componentDidMount(){const{shouldFocus:shouldFocus}=this.props;setTimeout((()=>{if(src_default$1.domElement(this.beacon)&&shouldFocus){this.beacon.focus()}}),0)}componentWillUnmount(){const style=document.getElementById("joyride-beacon-animation");if(style==null?void 0:style.parentNode){style.parentNode.removeChild(style)}}render(){const{beaconComponent:beaconComponent,continuous:continuous,index:index,isLastStep:isLastStep,locale:locale,onClickOrHover:onClickOrHover,size:size,step:step,styles:styles2}=this.props;const title=src_default$1.string(locale.open)?locale.open:innerText$1(locale.open);const sharedProps={"aria-label":title,onClick:onClickOrHover,onMouseEnter:onClickOrHover,ref:this.setBeaconRef,title:title};let component;if(beaconComponent){const BeaconComponent=beaconComponent;component=React.createElement(BeaconComponent,{continuous:continuous,index:index,isLastStep:isLastStep,size:size,step:step,...sharedProps})}else{component=React.createElement("button",{key:"JoyrideBeacon",className:"react-joyride__beacon","data-test-id":"button-beacon",style:styles2.beacon,type:"button",...sharedProps},React.createElement("span",{style:styles2.beaconInner}),React.createElement("span",{style:styles2.beaconOuter}))}return component}};function JoyrideTooltipCloseButton({styles:styles2,...props}){const{color:color,height:height,width:width,...style}=styles2;return React__default.createElement("button",{style:style,type:"button",...props},React__default.createElement("svg",{height:typeof height==="number"?`${height}px`:height,preserveAspectRatio:"xMidYMid",version:"1.1",viewBox:"0 0 18 18",width:typeof width==="number"?`${width}px`:width,xmlns:"http://www.w3.org/2000/svg"},React__default.createElement("g",null,React__default.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:color}))))}var CloseButton_default=JoyrideTooltipCloseButton;function JoyrideTooltipContainer(props){const{backProps:backProps,closeProps:closeProps,continuous:continuous,index:index,isLastStep:isLastStep,primaryProps:primaryProps,size:size,skipProps:skipProps,step:step,tooltipProps:tooltipProps}=props;const{content:content,hideBackButton:hideBackButton,hideCloseButton:hideCloseButton,hideFooter:hideFooter,locale:locale,showProgress:showProgress,showSkipButton:showSkipButton,styles:styles2,title:title}=step;const{back:back,close:close,last:last,next:next,skip:skip}=locale;const output={primary:close};if(continuous){output.primary=isLastStep?last:next;if(showProgress){output.primary=React.createElement("span",null,output.primary," (",index+1,"/",size,")")}}if(output.primary){output.primary=React.createElement("button",{"data-test-id":"button-primary",style:styles2.buttonNext,type:"button",...primaryProps},output.primary)}if(showSkipButton&&!isLastStep){output.skip=React.createElement("button",{"aria-live":"off","data-test-id":"button-skip",style:styles2.buttonSkip,type:"button",...skipProps},skip)}if(!hideBackButton&&index>0){output.back=React.createElement("button",{"data-test-id":"button-back",style:styles2.buttonBack,type:"button",...backProps},back)}output.close=!hideCloseButton&&React.createElement(CloseButton_default,{"data-test-id":"button-close",styles:styles2.buttonClose,...closeProps});return React.createElement("div",{key:"JoyrideTooltip","aria-label":getText(title)||getText(content),className:"react-joyride__tooltip",style:styles2.tooltip,...tooltipProps},React.createElement("div",{style:styles2.tooltipContainer},title&&React.createElement("h1",{"aria-label":getText(title),style:styles2.tooltipTitle},title),React.createElement("div",{style:styles2.tooltipContent},content)),!hideFooter&&React.createElement("div",{style:styles2.tooltipFooter},React.createElement("div",{style:styles2.tooltipFooterSpacer},output.skip),output.back,output.primary),output.close)}var Container_default=JoyrideTooltipContainer;var JoyrideTooltip=class extends React.Component{constructor(){super(...arguments);__publicField(this,"handleClickBack",(event=>{event.preventDefault();const{helpers:helpers}=this.props;helpers.prev()}));__publicField(this,"handleClickClose",(event=>{event.preventDefault();const{helpers:helpers}=this.props;helpers.close("button_close")}));__publicField(this,"handleClickPrimary",(event=>{event.preventDefault();const{continuous:continuous,helpers:helpers}=this.props;if(!continuous){helpers.close("button_primary");return}helpers.next()}));__publicField(this,"handleClickSkip",(event=>{event.preventDefault();const{helpers:helpers}=this.props;helpers.skip()}));__publicField(this,"getElementsProps",(()=>{const{continuous:continuous,isLastStep:isLastStep,setTooltipRef:setTooltipRef,step:step}=this.props;const back=getText(step.locale.back);const close=getText(step.locale.close);const last=getText(step.locale.last);const next=getText(step.locale.next);const skip=getText(step.locale.skip);let primaryText=continuous?next:close;if(isLastStep){primaryText=last}return{backProps:{"aria-label":back,"data-action":"back",onClick:this.handleClickBack,role:"button",title:back},closeProps:{"aria-label":close,"data-action":"close",onClick:this.handleClickClose,role:"button",title:close},primaryProps:{"aria-label":primaryText,"data-action":"primary",onClick:this.handleClickPrimary,role:"button",title:primaryText},skipProps:{"aria-label":skip,"data-action":"skip",onClick:this.handleClickSkip,role:"button",title:skip},tooltipProps:{"aria-modal":true,ref:setTooltipRef,role:"alertdialog"}}}))}render(){const{continuous:continuous,index:index,isLastStep:isLastStep,setTooltipRef:setTooltipRef,size:size,step:step}=this.props;const{beaconComponent:beaconComponent,tooltipComponent:tooltipComponent,...cleanStep}=step;let component;if(tooltipComponent){const renderProps={...this.getElementsProps(),continuous:continuous,index:index,isLastStep:isLastStep,size:size,step:cleanStep,setTooltipRef:setTooltipRef};const TooltipComponent=tooltipComponent;component=React.createElement(TooltipComponent,{...renderProps})}else{component=React.createElement(Container_default,{...this.getElementsProps(),continuous:continuous,index:index,isLastStep:isLastStep,size:size,step:step})}return component}};var JoyrideStep=class extends React.Component{constructor(){super(...arguments);__publicField(this,"scope",null);__publicField(this,"tooltip",null);__publicField(this,"handleClickHoverBeacon",(event=>{const{step:step,store:store}=this.props;if(event.type==="mouseenter"&&step.event!=="hover"){return}store.update({lifecycle:LIFECYCLE.TOOLTIP})}));__publicField(this,"setTooltipRef",(element=>{this.tooltip=element}));__publicField(this,"setPopper",((popper,type)=>{var _a;const{action:action,lifecycle:lifecycle,step:step,store:store}=this.props;if(type==="wrapper"){store.setPopper("beacon",popper)}else{store.setPopper("tooltip",popper)}if(store.getPopper("beacon")&&store.getPopper("tooltip")&&lifecycle===LIFECYCLE.INIT){store.update({action:action,lifecycle:LIFECYCLE.READY})}if((_a=step.floaterProps)==null?void 0:_a.getPopper){step.floaterProps.getPopper(popper,type)}}));__publicField(this,"renderTooltip",(renderProps=>{const{continuous:continuous,helpers:helpers,index:index,size:size,step:step}=this.props;return React.createElement(JoyrideTooltip,{continuous:continuous,helpers:helpers,index:index,isLastStep:index+1===size,setTooltipRef:this.setTooltipRef,size:size,step:step,...renderProps})}))}componentDidMount(){const{debug:debug,index:index}=this.props;log({title:`step:${index}`,data:[{key:"props",value:this.props}],debug:debug})}componentDidUpdate(previousProps){var _a;const{action:action,callback:callback,continuous:continuous,controlled:controlled,debug:debug,helpers:helpers,index:index,lifecycle:lifecycle,status:status,step:step,store:store}=this.props;const{changed:changed,changedFrom:changedFrom}=treeChanges$1(previousProps,this.props);const state=helpers.info();const skipBeacon=continuous&&action!==ACTIONS.CLOSE&&(index>0||action===ACTIONS.PREV);const hasStoreChanged=changed("action")||changed("index")||changed("lifecycle")||changed("status");const isInitial=changedFrom("lifecycle",[LIFECYCLE.TOOLTIP,LIFECYCLE.INIT],LIFECYCLE.INIT);const isAfterAction=changed("action",[ACTIONS.NEXT,ACTIONS.PREV,ACTIONS.SKIP,ACTIONS.CLOSE]);const isControlled=controlled&&index===previousProps.index;if(isAfterAction&&(isInitial||isControlled)){callback({...state,index:previousProps.index,lifecycle:LIFECYCLE.COMPLETE,step:previousProps.step,type:EVENTS.STEP_AFTER})}if(step.placement==="center"&&status===STATUS.RUNNING&&changed("index")&&action!==ACTIONS.START&&lifecycle===LIFECYCLE.INIT){store.update({lifecycle:LIFECYCLE.READY})}if(hasStoreChanged){const element=getElement(step.target);const elementExists=!!element;const hasRenderedTarget=elementExists&&isElementVisible(element);if(hasRenderedTarget){if(changedFrom("status",STATUS.READY,STATUS.RUNNING)||changedFrom("lifecycle",LIFECYCLE.INIT,LIFECYCLE.READY)){callback({...state,step:step,type:EVENTS.STEP_BEFORE})}}else{console.warn(elementExists?"Target not visible":"Target not mounted",step);callback({...state,type:EVENTS.TARGET_NOT_FOUND,step:step});if(!controlled){store.update({index:index+(action===ACTIONS.PREV?-1:1)})}}}if(changedFrom("lifecycle",LIFECYCLE.INIT,LIFECYCLE.READY)){store.update({lifecycle:hideBeacon(step)||skipBeacon?LIFECYCLE.TOOLTIP:LIFECYCLE.BEACON})}if(changed("index")){log({title:`step:${lifecycle}`,data:[{key:"props",value:this.props}],debug:debug})}if(changed("lifecycle",LIFECYCLE.BEACON)){callback({...state,step:step,type:EVENTS.BEACON})}if(changed("lifecycle",LIFECYCLE.TOOLTIP)){callback({...state,step:step,type:EVENTS.TOOLTIP});if(this.tooltip){this.scope=new Scope(this.tooltip,{selector:"[data-action=primary]"});this.scope.setFocus()}}if(changedFrom("lifecycle",[LIFECYCLE.TOOLTIP,LIFECYCLE.INIT],LIFECYCLE.INIT)){(_a=this.scope)==null?void 0:_a.removeScope();store.cleanupPoppers()}}componentWillUnmount(){var _a;(_a=this.scope)==null?void 0:_a.removeScope()}get open(){const{lifecycle:lifecycle,step:step}=this.props;return hideBeacon(step)||lifecycle===LIFECYCLE.TOOLTIP}render(){const{continuous:continuous,debug:debug,index:index,nonce:nonce,shouldScroll:shouldScroll2,size:size,step:step}=this.props;const target=getElement(step.target);if(!validateStep(step)||!src_default$1.domElement(target)){return null}return React.createElement("div",{key:`JoyrideStep-${index}`,className:"react-joyride__step"},React.createElement(ReactFloater,{...step.floaterProps,component:this.renderTooltip,debug:debug,getPopper:this.setPopper,id:`react-joyride-step-${index}`,open:this.open,placement:step.placement,target:step.target},React.createElement(JoyrideBeacon,{beaconComponent:step.beaconComponent,continuous:continuous,index:index,isLastStep:index+1===size,locale:step.locale,nonce:nonce,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:shouldScroll2,size:size,step:step,styles:step.styles})))}};var Joyride=class extends React.Component{constructor(props){super(props);__publicField(this,"helpers");__publicField(this,"store");__publicField(this,"callback",(data=>{const{callback:callback}=this.props;if(src_default$1.function(callback)){callback(data)}}));__publicField(this,"handleKeyboard",(event=>{const{index:index,lifecycle:lifecycle}=this.state;const{steps:steps}=this.props;const step=steps[index];if(lifecycle===LIFECYCLE.TOOLTIP){if(event.code==="Escape"&&step&&!step.disableCloseOnEsc){this.store.close("keyboard")}}}));__publicField(this,"handleClickOverlay",(()=>{const{index:index}=this.state;const{steps:steps}=this.props;const step=getMergedStep(this.props,steps[index]);if(!step.disableOverlayClose){this.helpers.close("overlay")}}));__publicField(this,"syncState",(state=>{this.setState(state)}));const{debug:debug,getHelpers:getHelpers,run:run,stepIndex:stepIndex}=props;this.store=createStore({...props,controlled:run&&src_default$1.number(stepIndex)});this.helpers=this.store.getHelpers();const{addListener:addListener}=this.store;log({title:"init",data:[{key:"props",value:this.props},{key:"state",value:this.state}],debug:debug});addListener(this.syncState);if(getHelpers){getHelpers(this.helpers)}this.state=this.store.getState()}componentDidMount(){if(!canUseDOM()){return}const{debug:debug,disableCloseOnEsc:disableCloseOnEsc,run:run,steps:steps}=this.props;const{start:start}=this.store;if(validateSteps(steps,debug)&&run){start()}if(!disableCloseOnEsc){document.body.addEventListener("keydown",this.handleKeyboard,{passive:true})}}componentDidUpdate(previousProps,previousState){if(!canUseDOM()){return}const{action:action,controlled:controlled,index:index,lifecycle:lifecycle,status:status}=this.state;const{debug:debug,run:run,stepIndex:stepIndex,steps:steps}=this.props;const{stepIndex:previousStepIndex,steps:previousSteps}=previousProps;const{reset:reset,setSteps:setSteps,start:start,stop:stop,update:update2}=this.store;const{changed:changedProps}=treeChanges$1(previousProps,this.props);const{changed:changed,changedFrom:changedFrom}=treeChanges$1(previousState,this.state);const step=getMergedStep(this.props,steps[index]);const stepsChanged=!equal$1(previousSteps,steps);const stepIndexChanged=src_default$1.number(stepIndex)&&changedProps("stepIndex");const target=getElement(step.target);if(stepsChanged){if(validateSteps(steps,debug)){setSteps(steps)}else{console.warn("Steps are not valid",steps)}}if(changedProps("run")){if(run){start(stepIndex)}else{stop()}}if(stepIndexChanged){let nextAction=src_default$1.number(previousStepIndex)&&previousStepIndex<stepIndex?ACTIONS.NEXT:ACTIONS.PREV;if(action===ACTIONS.STOP){nextAction=ACTIONS.START}if(![STATUS.FINISHED,STATUS.SKIPPED].includes(status)){update2({action:action===ACTIONS.CLOSE?ACTIONS.CLOSE:nextAction,index:stepIndex,lifecycle:LIFECYCLE.INIT})}}if(!controlled&&status===STATUS.RUNNING&&index===0&&!target){this.store.update({index:index+1});this.callback({...this.state,type:EVENTS.TARGET_NOT_FOUND,step:step})}const callbackData={...this.state,index:index,step:step};const isAfterAction=changed("action",[ACTIONS.NEXT,ACTIONS.PREV,ACTIONS.SKIP,ACTIONS.CLOSE]);if(isAfterAction&&changed("status",STATUS.PAUSED)){const previousStep=getMergedStep(this.props,steps[previousState.index]);this.callback({...callbackData,index:previousState.index,lifecycle:LIFECYCLE.COMPLETE,step:previousStep,type:EVENTS.STEP_AFTER})}if(changed("status",[STATUS.FINISHED,STATUS.SKIPPED])){const previousStep=getMergedStep(this.props,steps[previousState.index]);if(!controlled){this.callback({...callbackData,index:previousState.index,lifecycle:LIFECYCLE.COMPLETE,step:previousStep,type:EVENTS.STEP_AFTER})}this.callback({...callbackData,type:EVENTS.TOUR_END,step:previousStep,index:previousState.index});reset()}else if(changedFrom("status",[STATUS.IDLE,STATUS.READY],STATUS.RUNNING)){this.callback({...callbackData,type:EVENTS.TOUR_START})}else if(changed("status")||changed("action",ACTIONS.RESET)){this.callback({...callbackData,type:EVENTS.TOUR_STATUS})}this.scrollToStep(previousState);if(step.placement==="center"&&status===STATUS.RUNNING&&lifecycle===LIFECYCLE.INIT){this.store.update({lifecycle:LIFECYCLE.READY})}}componentWillUnmount(){const{disableCloseOnEsc:disableCloseOnEsc}=this.props;if(!disableCloseOnEsc){document.body.removeEventListener("keydown",this.handleKeyboard)}}scrollToStep(previousState){const{index:index,lifecycle:lifecycle,status:status}=this.state;const{debug:debug,disableScrollParentFix:disableScrollParentFix=false,scrollDuration:scrollDuration,scrollOffset:scrollOffset=20,scrollToFirstStep:scrollToFirstStep=false,steps:steps}=this.props;const step=getMergedStep(this.props,steps[index]);const target=getElement(step.target);const shouldScrollToStep=shouldScroll({isFirstStep:index===0,lifecycle:lifecycle,previousLifecycle:previousState.lifecycle,scrollToFirstStep:scrollToFirstStep,step:step,target:target});if(status===STATUS.RUNNING&&shouldScrollToStep){const hasCustomScroll=hasCustomScrollParent(target,disableScrollParentFix);const scrollParent2=getScrollParent(target,disableScrollParentFix);let scrollY=Math.floor(getScrollTo(target,scrollOffset,disableScrollParentFix))||0;log({title:"scrollToStep",data:[{key:"index",value:index},{key:"lifecycle",value:lifecycle},{key:"status",value:status}],debug:debug});const beaconPopper=this.store.getPopper("beacon");const tooltipPopper=this.store.getPopper("tooltip");if(lifecycle===LIFECYCLE.BEACON&&beaconPopper){const{offsets:offsets,placement:placement}=beaconPopper;if(!["bottom"].includes(placement)&&!hasCustomScroll){scrollY=Math.floor(offsets.popper.top-scrollOffset)}}else if(lifecycle===LIFECYCLE.TOOLTIP&&tooltipPopper){const{flipped:flipped,offsets:offsets,placement:placement}=tooltipPopper;if(["top","right","left"].includes(placement)&&!flipped&&!hasCustomScroll){scrollY=Math.floor(offsets.popper.top-scrollOffset)}else{scrollY-=step.spotlightPadding}}scrollY=scrollY>=0?scrollY:0;if(status===STATUS.RUNNING){scrollTo(scrollY,{element:scrollParent2,duration:scrollDuration}).then((()=>{setTimeout((()=>{var _a;(_a=this.store.getPopper("tooltip"))==null?void 0:_a.instance.update()}),10)}))}}}render(){if(!canUseDOM()){return null}const{index:index,lifecycle:lifecycle,status:status}=this.state;const{continuous:continuous=false,debug:debug=false,nonce:nonce,scrollToFirstStep:scrollToFirstStep=false,steps:steps}=this.props;const isRunning=status===STATUS.RUNNING;const content={};if(isRunning&&steps[index]){const step=getMergedStep(this.props,steps[index]);content.step=React.createElement(JoyrideStep,{...this.state,callback:this.callback,continuous:continuous,debug:debug,helpers:this.helpers,nonce:nonce,shouldScroll:!step.disableScrolling&&(index!==0||scrollToFirstStep),step:step,store:this.store});content.overlay=React.createElement(JoyridePortal,{id:"react-joyride-portal"},React.createElement(JoyrideOverlay,{...step,continuous:continuous,debug:debug,lifecycle:lifecycle,onClickOverlay:this.handleClickOverlay}))}return React.createElement("div",{className:"react-joyride"},content.step,content.overlay)}};__publicField(Joyride,"defaultProps",defaultProps);var components_default=Joyride;const Tooltip=React__default.forwardRef((props=>jsxs("div",{className:"pb_card_kit_border_none p_none",...props.tooltipProps,children:[props.step.title&&jsxs("div",{children:[jsxs(Flex,{align:"center",justify:"between",padding:"xs",children:[jsx(Title,{paddingLeft:"xs",size:4,children:props.step.title}),props.skip&&jsx(Button,{...props.skipProps,id:"skip",text:"Skip Tour",variant:"link"}),jsx(Button,{...props.skipProps,id:"skip",text:"Skip Tour",variant:"link"})]}),jsx(SectionSeparator,{})]}),jsx(Flex,{padding:"sm",children:props.step.content}),jsx(SectionSeparator,{}),jsxs(Flex,{justify:props.index==0?"end":"between",padding:"xs",children:[props.index>0&&jsx(Button,{...props.backProps,id:"back",text:"Back"}),props.continuous&&!props.isLastStep&&jsx(Button,{...props.primaryProps,id:"next",text:"Next"}),!props.continuous&&jsx(Button,{...props.closeProps,id:"close",text:"Close"}),!(props.continuous&&!props.isLastStep||!props.continuous)&&jsx(Button,{...props.closeProps,id:"close",text:"Close"})]})]})));const Walkthrough=props=>{const{aria:aria={},callback:callback,className:className,continuous:continuous=false,data:data={},disableOverlay:disableOverlay,floaterProps:floaterProps={offset:50},htmlOptions:htmlOptions={},id:id,run:run=false,steps:steps,styles:styles2={options:{zIndex:2e4}},showSkipButton:showSkipButton}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_walkthrough"),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsx(components_default,{callback:callback,continuous:continuous,disableOverlay:disableOverlay,disableScrolling:true,floaterProps:floaterProps,run:run,showSkipButton:showSkipButton,steps:steps,styles:styles2,tooltipComponent:Tooltip,...props})})};const getDayOfWeek=(value,compact)=>{if(compact){return DateTime$1.toDayAbbr(value)}else{return DateTime$1.toWeekday(value)}};const getFormattedDate=(value,variant)=>{if(variant==="day_only"){return DateTime$1.toDay(value).toString()}else{const format=variant==="expanded"?"expanded":"month_day";return DateTime$1.toCustomFormat(value,format)}};const WeekdayStacked=props=>{const{align:align="left",aria:aria={},className:className,dark:dark=false,data:data={},date:date=new Date,htmlOptions:htmlOptions={},id:id,variant:variant="month_day",compact:compact=false}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_weekday_stacked_kit",align),globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[jsx(Caption,{dark:dark,children:getDayOfWeek(date,compact)}),jsx(Title,{dark:dark,size:4,tag:"span",text:getFormattedDate(date,variant)})]})};export{Source as $,AdvancedTable as A,BreadCrumbs as B,Contact as C,DashboardValue as D,Timestamp as E,FileUpload as F,Lightbox as G,Hashtag as H,IconStatValue as I,LoadingInline as J,Map$1 as K,List as L,MultipleUsers as M,MapCustomButton as N,Message as O,Pill as P,MultipleUsersStacked as Q,Overlay as R,Select$1 as S,Table as T,ProgressSimple as U,Person as V,PersonContact as W,ProgressPills as X,ProgressStep as Y,ProgressStepItem as Z,SelectableIcon as _,AvatarActionButton as a,StarRating as a0,StatChange as a1,StatValue as a2,Textarea$1 as a3,Time as a4,TimeRangeInline as a5,TimeStackedDefault as a6,Timeline as a7,TitleDetail as a8,TitleCount as a9,Toggle as aa,UserBadge as ab,Walkthrough as ac,WeekdayStacked as ad,SelectableListItem as ae,TableRow as af,BreadCrumbItem as b,ButtonToolbar as c,ListItem as d,Currency as e,PbDate as f,DatePicker as g,LabelValue as h,DateRangeInline as i,DateRangeStacked as j,DateStacked as k,DateTime as l,DateTimeStacked as m,DateYearStacked as n,Detail as o,SelectableList as p,Dropdown as q,Filter as r,FixedConfirmationToast as s,FormGroup as t,SelectableCard as u,SelectableCardIcon as v,HomeAddressStreet as w,IconValue as x,LabelPill as y,Layout as z};
|